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 — doc: Remove tracing link in toc by yosuke-furukawa · Pull Request #334 · nodejs/node

Conversation

@yosuke-furukawa

@yosuke-furukawa yosuke-furukawa commented Jan 13, 2015

Copy link
Copy Markdown
Member

When I checked the new api documents, I got 404 error.
https://iojs.org/download/nightly/v1.0.0-nightly201501135ea716d895/doc/api/tracing.html

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
@yosuke-furukawa
doc: Remove tracing link in toc
a5f4d9f
bnoordhuis pushed a commit that referenced this pull request Jan 13, 2015
@yosuke-furukawa @bnoordhuis
doc: remove tracing link in toc
fa004f3
PR-URL: #334
Reviewed-By: Ben Noordhuis <[email protected]>
@bnoordhuis

bnoordhuis commented Jan 13, 2015

Copy link
Copy Markdown
Member

Good catch! Landed in fa004f3, thanks.

All reactions

Sorry, something went wrong.

Uh oh!

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

@bnoordhuis bnoordhuis closed this Jan 13, 2015
@yosuke-furukawa

yosuke-furukawa commented Jan 14, 2015

Copy link
Copy Markdown
Member Author

oops, tracing.html is 404 again.
I guess we need to regenerate the api docs if the markdown is changed.

All reactions

Sorry, something went wrong.

Uh oh!

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

@snyk-bot snyk-bot mentioned this pull request Dec 6, 2021
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 IngridMi/node#7
Open
This was referenced Jan 12, 2022
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 dannybrown13/node#8
Open
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 dannybrown13/node#9
Open
@snyk-bot snyk-bot mentioned this pull request Feb 1, 2022
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 BryanLaura/node#6
Open
This was referenced Feb 28, 2022
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 jacobtarango23/node#4
Open
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 jacobtarango23/node#6
Open
@snyk-bot snyk-bot mentioned this pull request May 3, 2022
[Snyk] Upgrade source-map from 0.5.7 to 0.7.3 pratapadi/node#3
Open
@NOUIY NOUIY mentioned this pull request Jun 23, 2022
[Snyk] Upgrade rollup-plugin-typescript2 from 0.20.1 to 0.32.0 NOUIY/node#178
Open
@snyk-bot snyk-bot mentioned this pull request Jun 28, 2022
[Snyk] Upgrade rollup-plugin-typescript2 from 0.20.1 to 0.32.1 NOUIY/node#186
Open
@snyk-bot snyk-bot mentioned this pull request Jul 19, 2022
[Snyk] Upgrade rollup-plugin-typescript2 from 0.20.1 to 0.32.1 jgowdy/node#2
Open
@NOUIY NOUIY mentioned this pull request Aug 4, 2022
[Snyk] Upgrade rollup-plugin-typescript2 from 0.20.1 to 0.32.1 NOUIY/node#234
Open
@snyk-bot snyk-bot mentioned this pull request Dec 29, 2022
[Snyk] Upgrade source-map from 0.5.7 to 0.7.4 ZRDK/node#3
Open
@leonardoadame leonardoadame mentioned this pull request Jul 6, 2023
[Snyk] Fix for 5 vulnerabilities leonardoadame/node#27
Open
@karencapiiro karencapiiro mentioned this pull request May 7, 2024
[Snyk] Upgrade source-map from 0.5.7 to 0.7.4 karencapiiro/node#76
Open
@pratapadi pratapadi mentioned this pull request May 7, 2024
[Snyk] Upgrade source-map from 0.5.7 to 0.7.4 pratapadi/node#112
Open
Andarist referenced this pull request in replayio/node Oct 7, 2026
@Andarist @claude
Port WeakRef and FinalizationRegistry record/replay from Chromium (#162)
0ea7a6e
* 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 Nov 5, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
2461e6a
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 Nov 6, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
5772a01
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 Nov 6, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
d410b10
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 Nov 6, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
f508cd6
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 Nov 6, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
803becf
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 Nov 6, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
bc6fbc1
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 Nov 6, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
b841d07
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 Nov 6, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
82fd35a
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
6c77426
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
3a4dc39
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
baf8f9d
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 Nov 10, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
768b728
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 Nov 10, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
dbc0265
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
5fe5004
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
3276389
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
bc89909
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
1107dca
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
c503bf0
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
5771a08
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
c11b90c
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
dd97e78
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
047b36d
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
ffd5f60
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
60d0602
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
825cd5c
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
d960d1a
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 Nov 10, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
68184d5
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 Nov 11, 2026
@Andarist
Drive WeakRef and FinalizationRegistry from the recording
f3312bb
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 Nov 11, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
5fc6670
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 Nov 11, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
e179be2
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 Nov 12, 2026
@Andarist @bhackett1024 @claude
Drive WeakRef and FinalizationRegistry from the recording
0e76a22
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

Reviewers

No reviews

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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.

2 participants

@yosuke-furukawa @bnoordhuis
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.