GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — doc: Remove tracing link in toc by yosuke-furukawa · Pull Request #334 · nodejs/node Conversation
Member
When I checked the new api documents, I got 404 error. tracing api is not included in version 1.0.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bnoordhuis
pushed a commit
that referenced
this pull request
PR-URL: #334 Reviewed-By: Ben Noordhuis <[email protected]>
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
Author
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
This was referenced
This was referenced
Andarist
referenced
this pull request
in replayio/node
* Port WeakRef and FinalizationRegistry record/replay from the Chromium fork Port replayio/chromium-v8#279, #334 and #335, ending at the state of #335: - WeakRef.prototype.deref() records/replays whether the target is alive. When replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. - FinalizationRegistry cleanup of registries constructed at a point that replays ("tracked", behind the "finalization-registry" feature) is driven by the recording: the GC no longer schedules the cleanup task for them, ReplayFinalizationRegistries::Poll records the decision at every microtask checkpoint, and the cleanup loop records which cell each callback is called for. When replaying, the targets of tracked cells are marked strongly, and the recorded cells are cleared right before their callbacks run. Registries the recording's GC collected are released. - unregister() and register() of a tracked cell while events are disallowed crash, since they would change the registry on one side only. - Per-isolate replay state lives in ReplayIsolateData, reset in Isolate::Deinit before the global handles go away. V8 9.4 adaptations: JSFinalizationRegistry accessors are hand-written, the unregister bookkeeping hooks into Unregister's match callback, and recordreplay::AreEventsPassedThrough is added (chromium-v8 f6f61489066). Co-Authored-By: Claude Opus 5.5 <[email protected]> * Update the WeakRef/FinalizationRegistry port to the current fork PRs Bring the port in line with the latest replayio/chromium-v8#334 and #335 (up to 609b71dddca): - Rename the added fields and runtime functions with the record_replay / RecordReplay prefix, and pass Heap::RecordReplayTracking to the dirty registry helpers and the cleanup task. Heap::DequeueDirtyJSFinalizationRegistry loses its last caller and is removed. - Record what the GC did to tracked registries and WeakRefs in a single ReplayGCPoll::Poll at every microtask checkpoint. - Track WeakRefs constructed at a deterministic point ("weak-ref-collection" feature): the recording notes which ones its GC cleared, and the replay clears the same targets instead of keeping them alive until the WeakRef goes away. The list of tracked WeakRefs lives in old space. - Give a WeakCell its id before it is linked into the registry, cache IsReplaying() in the marking visitor, and crash when a replayed deref() or a delivered cell disagrees with the recording. V8 9.4 adaptations: src/replay/replayio.{h,cc} only carry AreEventsAvailable(), global-handles.h replaces global-handles-inl.h, and the Torque constructor uses assert where the fork uses dcheck. Co-Authored-By: Claude Opus 5.5 <[email protected]> * Track FinalizationRegistries deserialized from a snapshot A FinalizationRegistry gets its record/replay id when it is constructed. One deserialized from the startup snapshot, like the registry AbortSignal.timeout() uses, was constructed when the snapshot was built and so has none, and its cleanup task was posted from inside the GC and run at a point which depends on when the GC ran. Give a registry without an id one on its first register() call, when it has no cells yet, so that it is tracked like any other from then on. When the GC still finds cleared cells of a registry without an id (the feature is off, or the registry was populated before it could be adopted), leave them uncollected instead of running the cleanup at a GC-dependent point, and report it as a diagnostic once. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit cf7518182391241161b1981647add940da5c7e9b) * Keep the replay isolate data until the heap tear down has started Isolate::Deinit reset it before debug()->Unload() and the wasm compile job cleanup, which can still allocate and so run a GC. A mark-compact in that window which cleared a tracked WeakRef's target called ReplayWeakRefs::OnTargetCleared on the reset data. Reset it after Heap::StartTearDown, after which no GC runs and before the global handles its v8::Globals need are destroyed, and have OnTargetCleared tolerate missing data like ReplayGCPoll::Poll does. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit ba9caeffae56707d94b22e2b1b174845e5da4bca) * Skip the WeakRef and FinalizationRegistry runtime calls when not recording or replaying Port of replayio/chromium-v8#343, first commit. WeakRef.prototype.deref(), the WeakRef constructor, the FinalizationRegistry constructor and register() each called a RecordReplay* runtime function unconditionally. Outside record/replay those functions do nothing, but the builtin-to-runtime transition costs every caller: deref() went from an inline field load to a runtime call. The process-wide recording flag is now readable by generated code through ExternalReference::record_replay_is_recording_or_replaying, and the builtins only call the runtime when it is set. When it is clear, deref() loads the target inline as upstream does and the record/replay ids stay 0, which the runtime side already treats as untracked. The flag is set by recordreplay::SetRecordingOrReplaying before any isolate exists and never changes, and it is per process like recordreplay::IsRecordingOrReplaying(). Co-Authored-By: Claude Fable 5.1 <[email protected]> * Return a WeakRef target as it is when events are unavailable Port of replayio/chromium-v8#343, second commit. Runtime_RecordReplayWeakRefDeref recorded the target's liveness even where the driver cannot record or replay a value, e.g. while a pause evaluates an expression which calls deref(). The driver passed the value through, so the result was the current target either way, but it added a recording warning on every call. Co-Authored-By: Claude Fable 5.1 <[email protected]> * Say "deterministic point", not "point which replays" What the record/replay bookkeeping needs is a point whose behaviour is semantically deterministic between recording and replay, where the same state is reached and the same decisions are made, so that a value recorded or cleanup run there reproduces. "A point which replays" named it badly: GC points replay too, at other places. Comments and diagnostics only. Co-Authored-By: Claude Fable 5.1 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
bhackett1024
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and nodejs#343). WeakRef.prototype.deref() records whether its target is alive; when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and nodejs#343). WeakRef.prototype.deref() records whether its target is alive; when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and nodejs#343). WeakRef.prototype.deref() records whether its target is alive; when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and nodejs#343). WeakRef.prototype.deref() records whether its target is alive; when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Node 26's V8 also allocates WeakCells in the young generation and made WeakCell::Nullify skip the write barriers, since the GC it normally runs in records the slots itself. NextCell nullifies the recorded cell outside a GC, so every slot Nullify reports needs the combined barrier here: the cells next to this one can be in another generation, and an old-to-new slot missing from the remembered set goes stale on the next scavenge, which left concurrent marking and later Nullify calls following a pointer into from-space. Nullify's DCHECKs that it runs in a GC fail in debug builds; release builds don't have them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. What the replay drives outside a GC, Nullify here, has to run the write barriers upstream's GC would have recorded instead. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist
referenced
this pull request
in replayio/node
Ported from the Chromium fork (replayio/chromium-v8#279, #334, #335 and when replaying, marking treats JSWeakRef::target as strong and a deref() the recording saw as dead clears the field. WeakRefs constructed at a deterministic point are tracked ("weak-ref-collection"), so the replay clears the targets the recording's GC cleared instead of keeping them alive. Cleanup of tracked FinalizationRegistries ("finalization-registry") is driven by the recording too: the GC no longer schedules their cleanup task, ReplayGCPoll::Poll records at every microtask checkpoint what the GC did (cleanup task wanted, registries collected, WeakRefs cleared), and the cleanup loop records which cell each callback runs for. A registry deserialized from the snapshot gets its id on its first register(). register() or unregister() of a tracked cell while events are disallowed crashes, since it would change the registry on one side only. Per-isolate state lives in ReplayIsolateData, released after Heap::StartTearDown. Node 24's V8 drives the FinalizationRegistry cleanup loop from Torque, so the gate that keeps the loop from running user callbacks at a point the replay does not reach moves into C++ where the loop now lives. Node 26 moves the weak-reference accessors behind new names, so the fork's calls follow them. Node 26's V8 also allocates WeakCells in the young generation and made WeakCell::Nullify skip the write barriers, since the GC it normally runs in records the slots itself. NextCell nullifies the recorded cell outside a GC, so every slot Nullify reports needs the combined barrier here: the cells next to this one can be in another generation, and an old-to-new slot missing from the remembered set goes stale on the next scavenge, which left concurrent marking and later Nullify calls following a pointer into from-space. Nullify's DCHECKs that it runs in a GC fail in debug builds; release builds don't have them. Rebase note: a GC must never decide by itself when a WeakRef reads empty or when a cleanup callback runs; new upstream paths that clear cells or post the cleanup task need the same recording. What the replay drives outside a GC, Nullify here, has to run the write barriers upstream's GC would have recorded instead. The builtins only call the RecordReplay runtime functions when the process-wide recording flag is set, and a record/replay id of 0 means untracked. From #162. Co-authored-by: Brian Hackett <[email protected]> Co-Authored-By: Claude Opus 5 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersNo reviewsUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
None yet
ProjectsMilestoneNo milestoneDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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 01402775 — 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. |