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 — Replay `Error.stack` and error messages by Andarist · Pull Request #137 · replayio/node

Conversation

@Andarist

@Andarist Andarist commented Sep 22, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Port of the Chromium fork's [PRO-1150] changes (Replay error stacks, Replay error messages in MessageFormatter::Format, and the follow-ups that skip both while events are disallowed and don't cache a stack formatted for a replay-only read). Error.stack can differ between recording and replaying even though the same code runs, since which frames V8 reports depends on JIT state and the replay deoptimizes code the recording never did; recording the formatted string makes the replayed one identical.

Node formats every stack through its prepareStackTrace callback, which returns before the internal formatter Chromium's change hooks, so the recording wraps the whole of FormatStackTrace. The callback's result need not be a string, so whether a string was recorded is recorded as well.

Ports:
replayio/chromium-v8#270
replayio/chromium-v8#272
replayio/chromium-v8#278
replayio/chromium-v8#280

tested with https://github.com/replayio/backend/pull/13371

Sorry, something went wrong.

Uh oh!

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

All reactions
Andarist added 2 commits September 21, 2026 22:54
@Andarist
Replay Error.stack and error messages
1fcf898
Port of the Chromium fork's [PRO-1150] changes (Replay error stacks,
Replay error messages in MessageFormatter::Format, and the follow-ups that
skip both while events are disallowed and don't cache a stack formatted for
a replay-only read). Error.stack can differ between recording and
replaying even though the same code runs, since which frames V8 reports
depends on JIT state and the replay deoptimizes code the recording never
did; recording the formatted string makes the replayed one identical.

Node formats every stack through its prepareStackTrace callback, which
returns before the internal formatter Chromium's change hooks, so the
recording wraps the whole of FormatStackTrace. The callback's result need
not be a string, so whether a string was recorded is recorded as well.
@Andarist
Record error strings as UTF-16 code units
7d8dbeb
The formatted Error.stack and error messages were recorded by converting
them to UTF-8 with String::ToCString and back with NewStringFromUtf8, and
the converted string was used while recording too. That loses unpaired
surrogates (each comes back as up to three U+FFFD), so the program saw
different strings while being recorded than it does normally. Chromium's
version additionally turns NULs into spaces through ToCString's default.

Record the string's UTF-16 code units instead and rebuild it with
NewStringFromTwoByte, which yields a one-byte string when every unit fits,
so the string is identical to the original in both runs. This also drops
the RecordReplayString helper, which has no other users.
Andarist
Andarist commented Sep 22, 2026
View reviewed changes
Comment thread deps/v8/src/execution/messages.cc Outdated
// Chromium fork does. Node formats through its prepareStackTrace callback,
// whose result need not be a string, so whether one was recorded is recorded
// as well.
MaybeHandle<Object> ErrorUtils::FormatStackTrace(Isolate* isolate,

@Andarist Andarist Sep 22, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Why this wraps the whole function, unlike Chromium

Chromium records Error.stack only at the end of V8's built-in formatter. Both prepareStackTrace branches (the embedder callback and a user's Error.prepareStackTrace) return before that point and aren't recorded. That works in Chromium because Blink never installs a PrepareStackTraceCallback, so nearly every stack comes from the built-in formatter.

Node always installs that callback: prepareStackTrace in lib/internal/errors.js formats every stack, and calls a user's Error.prepareStackTrace when there is one. With Chromium's placement node would record nothing, so the port wraps the whole function and records all branches. A callback may return something that isn't a string, so it also records whether the result was a string.

prepareStackTrace considerations

  • Node: the callback is JS, and it still runs during replay, over the replay's own call sites. Only its result is replaced.
  • Chromium: a page's own Error.prepareStackTrace isn't recorded. Such callbacks usually return structured call sites, not a string, and would run again during replay regardless. So the only gap is a page callback that returns a string over frames that differ. It could be covered by recording at the same point as here

Sorry, something went wrong.

Uh oh!

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

All reactions
Andarist
Andarist commented Sep 22, 2026
View reviewed changes
Comment thread deps/v8/src/execution/messages.cc Outdated
// made of the recorded ones while replaying. Copying code units instead of
// converting to UTF-8 keeps NULs and unpaired surrogates intact, so the
// program sees the same string it would without being recorded.
Handle<String> RecordReplayStringContents(Isolate* isolate, const char* why,

@Andarist Andarist Sep 22, 2026

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This version is an improvement over the one we have in Chromium. It's supposed to handle certain characters better - I have verified the results between non-recording replay-node and the recording one. With a chromium-style patch we would actually fail to preserve those utf16 input~ correctly.

Sorry, something went wrong.

Uh oh!

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

All reactions
Andarist added 5 commits September 22, 2026 12:22
@Andarist
Let the driver disable error string recording by feature name
269bc7c
Port Chromium's feature-aware IsRecordingOrReplaying(feature, subfeature)
and FeatureEnabled, backed by the driver's RecordReplayFeatureEnabled, and
gate recording error stacks and messages on the same feature names
Chromium uses, so RECORD_REPLAY_DISABLE_FEATURES turns them off in both.
@Andarist
Name the error string helper after Chromium's RecordReplayStringHandle
e07d1bf
Match the name and contract of Chromium's v8::replayio helper: overloads
for Handle and MaybeHandle, returning the input unchanged when the
feature named by why isn't recorded. It stays in messages.cc, its only
user, as the node fork has no src/replay.
@Andarist
Explain why error strings are only recorded on the main thread
a31f0d1
@Andarist
Match the error string comments to Chromium's
cca2e6d
@Andarist
Keep ErrorUtils::FormatStackTrace in place so the diff stays local
b868009
Put the recording wrapper where the original function was and move its
body below as FormatStackTraceImpl, declared ahead in the anonymous
namespace with the other helpers.
@Andarist
Andarist requested review from Domiii and bhackett1024 September 22, 2026 13:26
markerikson
markerikson approved these changes Sep 22, 2026
View reviewed changes
@Andarist
Andarist merged commit 4028145 into master Sep 22, 2026
3 checks passed

Uh oh!

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

@Andarist Andarist mentioned this pull request Sep 24, 2026
Record error strings as UTF-16 code units replayio/chromium-v8#328
Open
bhackett1024 pushed a commit that referenced this pull request Nov 5, 2026
@Andarist
Replay Error.stack and error messages
782ce9c
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
a094313
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
b8b6e79
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
32a0ac1
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,
#170, #173, #190, #191 and #202.

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
6d83cdc
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
d90615a
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,
#170, #173, #190, #191 and #202.

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
6984afb
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
9c06ecf
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
438e7c5
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,
#170, #173, #190, #191 and #202.

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
3d615e5
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,
#170, #173, #190, #191 and #202.

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist
Replay Error.stack and error messages
086d0cc
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist
Replay Error.stack and error messages
df88991
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist
Replay Error.stack and error messages
17f27df
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
850ea0e
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 6, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
c284d7c
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
be7a1e8
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
d538c76
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
860f33f
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
9694169
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
6ecb94a
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
1293d47
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
e995d76
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
eac606e
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
e8adf39
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
4a247a8
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
87a99d9
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
f77e4d5
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
7eb4af4
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
5e94ae9
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
92dc392
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
e05e971
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
0bc028b
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
98815fc
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
9d15ab8
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
eeeeda0
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 10, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
0644dd8
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
cb1ffb6
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 10, 2026
@Andarist
Replay Error.stack and error messages
bc55118
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist pushed a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Andarist
Add core V8 record/replay API surface
235727c
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@Andarist
Replay Error.stack and error messages
6f4452e
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
28138f2
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
fc7ec79
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
3e5ca48
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 11, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
e8c64c1
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Andarist added a commit that referenced this pull request Nov 12, 2026
@bhackett1024 @Domiii
@Andarist @claude
Add core V8 record/replay API surface
7e0331e
Add the v8::recordreplay public API class with methods for recording
state, event control, pointer registration, ordered locks, and the
C API bridge functions and driver symbol loading in api.cc.

Add include/replayio.h with RAII helpers (AutoPassThroughEvents,
AutoDisallowEvents with an optional label, AutoMarkReplayCode) and
include/replayio-macros.h with REPLAY_ASSERT macros usable from C.
Asserts are skipped when the driver disables them, warnings go through
RecordReplayWarning, and progress notifications are ignored while
events are disallowed. When JS progress asserts are enabled, progress
data is handed to the recorder through its assert data callbacks.

The driver can disable individual features at runtime, so
IsRecordingOrReplaying() takes an optional feature name and
FeatureEnabled() asks the driver, with the check skipped entirely when
nothing is disabled.

replayio-macros.h also declares RecordReplayWarningField, the driver's
layout for one typed detail of a warning (a string, integer, double or
bool under a key), and the V8RecordReplayWarning entry point that takes
a warning kind plus an array of those fields.

The scope helpers and the rest of the C++ surface live here too:
AutoAssertMaybeEventsDisallowed, which asserts its message on entry and
exit so the recording orders the scope unless events are disallowed,
AutoOrderedLock, and AreEventsPassedThrough(), each defined next to the
driver symbol it calls.

V8 11.3 gives Code::OptimizedCodeIterator a SafepointScope, and entering a
safepoint samples the time to reach it, so walking the optimized code reads
the clock where V8 10.2 walked the native contexts list and read nothing.
RecordReplayChangeInstrument walks that code to deoptimize it and the driver
only changes the instrumentation while replaying, so the walk runs with
events disallowed, as Debug::DiscardBaselineCode already does for its own.

Moving a pending exception aside to report it leaves any TryCatch the embedder
installed alone: node 22's V8 reports through the embedder's handler, so
clearing it there swallowed exceptions the embedder was waiting for.

The progress counter's external reference is kept out of the nullptr slot:
V8 13.6 CHECKs that external references are deduplicated when the snapshot is
loaded, so a driver-filled pointer that is still null at that point collides
with every other null one.

Rebase note: these headers mirror the driver's ABI. Every driver
function is looked up by name in api.cc, so a new recordreplay::
method needs its symbol loaded there, and RecordReplayWarningField's
layout and the V8RecordReplay* signatures have to match the driver
that REPLAY_BACKEND_REV pins.

Includes later changes from #128, #129, #132, #137, #159, #161, #162,

Co-authored-by: Domi <[email protected]>
Co-authored-by: Mateusz Burzyński <[email protected]>
Co-Authored-By: Claude Opus 5 <[email protected]>
Andarist added a commit that referenced this pull request Nov 12, 2026
@Andarist @bhackett1024
Replay Error.stack and error messages
ca71265
Node formats every stack through its prepareStackTrace callback, which
can return any value, so record whether the result was a string and the
string itself, then replay it verbatim. RecordReplayStringHandle copies
UTF-16 code units rather than converting to UTF-8, so NULs and unpaired
surrogates survive. Record MessageFormatter::Format the same way.

While events are disallowed, don't cache the formatted stack back onto
the error object, so inspecting an error during replay does not change
the program's state. (PRO-1150, PRO-2368)

From #137.

Co-authored-by: Brian Hackett <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markerikson markerikson markerikson approved these changes
@Domiii Domiii Awaiting requested review from Domiii
@bhackett1024 bhackett1024 Awaiting requested review from bhackett1024

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

@Andarist @markerikson
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.