Skip to content

lib: reduce amount of caught URL errors#52658

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
anonrig:reduce-url-throws
Jun 13, 2024
Merged

lib: reduce amount of caught URL errors#52658
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
anonrig:reduce-url-throws

Conversation

@anonrig

@anonrig anonrig commented Apr 24, 2024

Copy link
Copy Markdown
Member

Since we have URL.parse() now, we don't need try/catch with new URL(). This will potentially improve the performance of hot paths.

cc @nodejs/url

@anonrig anonrig requested review from GeoffreyBooth and aduh95 April 24, 2024 02:43
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/url

@nodejs-github-bot nodejs-github-bot added 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 Apr 24, 2024
@anonrig anonrig force-pushed the reduce-url-throws branch from a66a1c1 to e561d99 Compare April 24, 2024 02:44

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@anonrig anonrig force-pushed the reduce-url-throws branch 3 times, most recently from 9cfdd53 to b0f5fed Compare April 24, 2024 02:50
Comment thread lib/internal/modules/esm/hooks.js Outdated
Comment thread lib/internal/modules/esm/resolve.js Outdated
Comment thread lib/internal/modules/esm/translators.js Outdated
Comment thread lib/internal/url.js Outdated
Comment thread lib/internal/modules/esm/hooks.js Outdated
Comment thread lib/internal/modules/esm/resolve.js Outdated
@anonrig anonrig force-pushed the reduce-url-throws branch from b5265c6 to a69d20c Compare May 15, 2024 01:26
Comment thread lib/internal/modules/esm/translators.js Outdated
@anonrig anonrig force-pushed the reduce-url-throws branch 2 times, most recently from f85ee6c to 38be5ca Compare May 17, 2024 01:04
@aduh95 aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels May 17, 2024
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 17, 2024
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@anonrig anonrig force-pushed the reduce-url-throws branch 2 times, most recently from 0cd00d8 to 935e22e Compare May 17, 2024 20:19
Comment thread lib/internal/url.js Outdated
Comment thread lib/internal/source_map/source_map_cache.js
targos pushed a commit that referenced this pull request Jun 20, 2024
PR-URL: #52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
eliphazbouye pushed a commit to eliphazbouye/node that referenced this pull request Jun 20, 2024
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
bmeck pushed a commit to bmeck/node that referenced this pull request Jun 22, 2024
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Jan 23, 2025
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Jan 23, 2025
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Jan 23, 2025
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Jan 31, 2025
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
joyeecheung pushed a commit to joyeecheung/node that referenced this pull request Feb 5, 2025
PR-URL: nodejs#52658
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
@joyeecheung

Copy link
Copy Markdown
Member

backport in #56927

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. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants