Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
lib: add WeakRef and FinalizationRegistry to primordials#37263
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
lib: add WeakRef and FinalizationRegistry to primordials#37263
Conversation
benjamingr commented Feb 7, 2021
Thanks! Any chance you could also make the (new'ish) weak event handler machinery in event_target use this? (It's the other place I know in the code that uses FinalizationRegistry and WeakRef). |
targos commented Feb 7, 2021
I wouldn't expect this to work yet. WeakRef can still be disabled with a V8 flag ( |
devsnek commented Feb 7, 2021
I might just go change that, moving the error snapshot use instead of creation. |
jasnell commented Feb 23, 2021
FWIW, Node.js already fails to start when the |
devsnek commented Feb 23, 2021
@jasnell the issue is that V8 disables flagged globals during snapshot, regardless of whether you expect them to be available later or not. |
aduh95 commented Mar 7, 2021
I'v e submitted https://chromium-review.googlesource.com/c/v8/v8/+/2741582/ to unblock this. |
devsnek commented Mar 7, 2021
@aduh95 cloudflare uses that flag for workers, probably can't land. |
devsnek commented Mar 7, 2021
I'd like to talk to the V8 team about a new flag system which allows them to be snapshotted, but they don't seem to care at all about our design constraints or maintaining contact with us so it's been delayed. |
aduh95 commented Apr 9, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Flag has been removed upstream, I've opened #38162 to test if that makes the tests pass. |
846fc79 to f98f3b5Compareaduh95 commented Apr 9, 2021 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
nodejs-github-bot commented Apr 9, 2021
nodejs-github-bot commented Apr 11, 2021
f98f3b5 to 0669710Comparenodejs-github-bot commented Apr 12, 2021
nodejs-github-bot commented Apr 13, 2021
nodejs-github-bot commented Apr 13, 2021
Co-authored-by: Antoine du Hamel <[email protected]> PR-URL: nodejs#37263 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
0669710 to 78343bbCompareaduh95 commented Apr 13, 2021
Landed in 78343bb |
This cleans up the two TODOs in:
node/lib/internal/util/iterable_weak_map.js
Lines 11 to 21 in aac2713