GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — src: simplify adding fast APIs to ExternalReferenceRegistry by Renegade334 · Pull Request #58896 · nodejs/node

Conversation

@Renegade334

@Renegade334 Renegade334 commented Jun 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

The process for adding a fast API to the external registry is currently rather cumbersome, and involves:

  1. adding the fast callback typedef to the long and ugly list of "allowed" CFunction signatures in node_external_reference.h
  2. registering the fast callback
  3. registering the v8::CFunctionInfo object obtained from the corresponding CFunction

This PR adds a new registry overload which simply takes a reference to the CFunction and registers both the callback pointer and the info pointer, without requiring any additional typedefs.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@nodejs-github-bot

nodejs-github-bot commented Jun 29, 2025

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/crypto
  • @nodejs/url
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Jun 29, 2025
@codecov

codecov Bot commented Jun 29, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.09%. Comparing base (4b4aaf9) to head (7cc286d).
⚠️ Report is 522 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #58896      +/-   ##
==========================================
- Coverage   90.11%   90.09%   -0.03%     
==========================================
  Files         640      640              
  Lines      188427   188396      -31     
  Branches    36965    36957       -8     
==========================================
- Hits       169804   169726      -78     
- Misses      11359    11388      +29     
- Partials     7264     7282      +18     
Files with missing lines Coverage Δ
src/crypto/crypto_timing.cc 100.00% <100.00%> (ø)
src/histogram.cc 72.74% <100.00%> (-0.78%) ⬇️
src/node_buffer.cc 69.41% <100.00%> (+0.39%) ⬆️
src/node_external_reference.h 100.00% <100.00%> (ø)
src/node_os.cc 79.78% <100.00%> (-0.22%) ⬇️
src/node_perf.cc 86.38% <100.00%> (-0.06%) ⬇️
src/node_process_methods.cc 87.80% <100.00%> (-0.06%) ⬇️
src/node_types.cc 94.87% <100.00%> (-0.26%) ⬇️
src/node_url.cc 78.33% <100.00%> (-0.40%) ⬇️
src/node_util.cc 81.67% <100.00%> (-0.06%) ⬇️
... and 3 more

... and 32 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas reviewed Jun 30, 2025
View reviewed changes
Comment thread src/node_external_reference.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

joyeecheung
joyeecheung approved these changes Jun 30, 2025
View reviewed changes

@joyeecheung joyeecheung left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I like how much simplification this brings! Though I'd agree with @legendecas that an overload of Register feels more natural.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread src/node_external_reference.h Resolved

Uh oh!

There was an error while loading. Please reload this page.

@Renegade334
src: simplify adding fast APIs to ExternalReferenceRegistry
7cc286d
@Renegade334
Renegade334 force-pushed the register-cfunction-reference branch from ce7bf56 to 7cc286d Compare June 30, 2025 21:16
joyeecheung
joyeecheung approved these changes Jun 30, 2025
View reviewed changes
@joyeecheung joyeecheung added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 30, 2025
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Jun 30, 2025
@nodejs-github-bot

nodejs-github-bot commented Jun 30, 2025

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/67757/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tniessen
tniessen approved these changes Jul 1, 2025
View reviewed changes
legendecas
legendecas approved these changes Jul 1, 2025
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/67836/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas legendecas added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Jul 4, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Jul 4, 2025
@nodejs-github-bot
nodejs-github-bot merged commit f64b0b3 into nodejs:main Jul 4, 2025
@nodejs-github-bot

nodejs-github-bot commented Jul 4, 2025

Copy link
Copy Markdown
Collaborator

Landed in f64b0b3

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Renegade334
Renegade334 deleted the register-cfunction-reference branch July 4, 2025 13:38
RafaelGSS pushed a commit that referenced this pull request Jul 8, 2025
@Renegade334 @RafaelGSS
src: simplify adding fast APIs to ExternalReferenceRegistry
6af0163
PR-URL: #58896
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 8, 2025
2025-07-09, Version 24.4.0 (Current) #58993
Merged
@Renegade334 Renegade334 mentioned this pull request Jul 14, 2025
[v22.x backport] src: backport fast API changes #59065
Merged
@aduh95 aduh95 added the backport-open-v22.x Indicate that the PR has an open backport label Jul 21, 2025
aduh95 pushed a commit to Renegade334/node that referenced this pull request Jul 28, 2025
@Renegade334 @aduh95
src: simplify adding fast APIs to ExternalReferenceRegistry
6905258
PR-URL: nodejs#58896
Backport-PR-URL: nodejs#59065
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
@github-actions github-actions Bot mentioned this pull request Jul 28, 2025
2025-07-29, Version 22.18.0 'Jod' (LTS) #59256
Merged
codebytere added a commit to electron/electron that referenced this pull request Aug 4, 2025
@codebytere
src: simplify adding fast APIs to ExternalReferenceRegistry
a0573f8
nodejs/node#58896
jkleinsc pushed a commit to electron/electron that referenced this pull request Aug 4, 2025
@electron-roller @codebytere
chore: bump node to v22.18.0 (main) (#47937)
40cdfdb
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Aug 5, 2025
@electron-roller @codebytere
chore: bump node to v22.18.0 (main) (#47937)
ad3a1e4
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
codebytere added a commit to electron/electron that referenced this pull request Aug 5, 2025
@electron-roller @codebytere
chore: bump node to v22.18.0 (38-x-y) (#47936)
ecf905d
chore: bump node to v22.18.0 (main) (#47937)

* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
@richardlau richardlau added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport labels Sep 19, 2025
kigh-ota pushed a commit to kigh-ota/electron that referenced this pull request Sep 30, 2025
@electron-roller @codebytere @kigh-ota
chore: bump node to v22.18.0 (main) (electron#47937)
2dcc0ea
* chore: bump node in DEPS to v22.18.0

* crypto: fix inclusion of OPENSSL_IS_BORINGSSL define

nodejs/node#58845

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58960

* permission: propagate permission model flags on spawn

nodejs/node#58853

* esm: syncify default path of ModuleLoader\.load

nodejs/node#57419

* src: remove fast API for InternalModuleStat

nodejs/node#58489

* src: simplify adding fast APIs to ExternalReferenceRegistry

nodejs/node#58896

* chore: fixup patch indices

* src: fix internalModuleStat v8 fast path

nodejs/node#58054

* test: add tests to ensure that node.1 is kept in sync with cli.md

nodejs/node#58878

* crypto: fix SHAKE128/256 breaking change introduced with OpenSSL 3.4

nodejs/node#58942

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tniessen tniessen tniessen approved these changes
@joyeecheung joyeecheung joyeecheung approved these changes
@legendecas legendecas legendecas approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. backported-to-v22.x PRs backported to the v22.x-staging branch. c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@Renegade334 @nodejs-github-bot @tniessen @joyeecheung @legendecas @richardlau @aduh95
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.