Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: multiple urlpattern cleanups/improvements #56871

Closed

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Feb 1, 2025

Fixing up some error handling issues with URLPattern along with some other cleanups.

@jasnell jasnell requested review from anonrig and aduh95 February 1, 2025 21:39
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Feb 1, 2025
Copy link
Member

@anonrig anonrig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@anonrig anonrig requested a review from lemire February 1, 2025 21:41
@jasnell jasnell changed the title src: remove USE from node_url_pattern to handle error correctly src: multiple urlpattern cleanups/improvements Feb 1, 2025
@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell force-pushed the jasnell/minor-urlpattern-cleanups branch from 66d08c4 to a9749a5 Compare February 1, 2025 21:47
@anonrig anonrig added the commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. label Feb 1, 2025

This comment was marked as outdated.

@jasnell
Copy link
Member Author

jasnell commented Feb 1, 2025

Hmm looks like there's a big gap in test coverage on this despite the wpt tests. Will have to look at that next

@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Feb 2, 2025
src/node_url_pattern.cc Outdated Show resolved Hide resolved
src/memory_tracker.h Outdated Show resolved Hide resolved
@jasnell jasnell force-pushed the jasnell/minor-urlpattern-cleanups branch from a9749a5 to 120bc28 Compare February 2, 2025 16:42
@jasnell jasnell force-pushed the jasnell/minor-urlpattern-cleanups branch from 120bc28 to c9962a6 Compare February 2, 2025 16:45
@jasnell jasnell dismissed legendecas’s stale review February 2, 2025 16:46

Removed the offending code

@nodejs-github-bot

This comment was marked as outdated.

src/node_url_pattern.cc Outdated Show resolved Hide resolved
src/node_url_pattern.cc Outdated Show resolved Hide resolved
src/node_url_pattern.cc Show resolved Hide resolved
src/node_url_pattern.cc Show resolved Hide resolved
Co-authored-by: Yagiz Nizipli <yagiz@nizipli.com>
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Feb 2, 2025

jasnell added a commit that referenced this pull request Feb 3, 2025
* remove USE from node_url_pattern to handle error correctly
* simplify if block in node_url_pattern
* improve error handling in node_url_pattern
* fix error propagation on URLPattern init
* use ToV8Value where more convenient in node_url_pattern
* simplify URLPatternInit::ToJsObject by reducing boilerplate

PR-URL: #56871
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Feb 3, 2025

Landed in 35d199f

@jasnell jasnell closed this Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. whatwg-urlpattern
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants