Repository navigation
Abort on a GC inside a snapshot deserializer callback - #8368
Conversation
There was a problem hiding this comment.
Superseded by the review of
3a26d909.
This review, of abfd0644
✅ Approved — I found no issues. The GC-abort guard is scoped to context creation, the in-callback flag is set and reset correctly, and the counter now kept in WrappableDeserializeMetadata is still checked after the context is created.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
No issues found. The guard is scoped correctly around newContext(), the inCallback flag is reset with KJ_DEFER, and the bad-tag counter is still checked after the context is created.
📝 Documentation: ✅ LGTM
No issues found. The header comments describe the new data argument and the guard's behavior accurately.
Reviewed commit: abfd0644
abfd064 to
3a26d90
Compare
There was a problem hiding this comment.
Superseded by the review of
866d35c3.
This review, of 3a26d909
✅ Approved — I found no issues. The GC-abort guard is scoped to context creation, the in-callback flag is set and reset correctly, and the counter now kept in WrappableDeserializeMetadata is still checked after the context is created.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
No issues found. The guard is scoped correctly around newContext(), the inCallback flag is reset with KJ_DEFER, and the bad-tag counter is still checked after the context is created.
📝 Documentation: ✅ LGTM
No issues found. The header comments describe the new data argument and the guard's behavior accurately.
Reviewed commit: 3a26d909 — same changes as abfd0644, so this is that commit's review (no new review was run; line numbers are as of abfd0644)
3a26d90 to
866d35c
Compare
There was a problem hiding this comment.
Superseded by the review of
c8e232ff.
This review, of 866d35c3
✅ Approved — I found no issues. The GC-abort guard is scoped to context creation, the in-callback flag is set and reset correctly, and the counter now kept in WrappableDeserializeMetadata is still checked after the context is created.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
No issues found. The guard is scoped correctly around newContext(), the inCallback flag is reset with KJ_DEFER, and the bad-tag counter is still checked after the context is created.
📝 Documentation: ✅ LGTM
No issues found. The header comments describe the new data argument and the guard's behavior accurately.
Reviewed commit: 866d35c3 — same changes as abfd0644, so this is that commit's review (no new review was run; line numbers are as of abfd0644)
V8 runs the context deserializer's embedder callbacks under DisallowGarbageCollection, which only a debug build of V8 checks. A GC that starts there in a release build runs on a half-restored context. While a context is created from a startup snapshot, a GC prologue callback now aborts the process if a GC starts inside deserializeInternalFields() or deserializeApiWrapperCallback(). Both callbacks now take the WrappableDeserializeMetadata, which also holds the internal-field findings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
866d35c to
c8e232f
Compare
There was a problem hiding this comment.
✅ Approved — I found no issues. The GC-abort guard is scoped to context creation, the in-callback flag is set and reset correctly, and the counter now kept in WrappableDeserializeMetadata is still checked after the context is created.
The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.
✅ All checks passed
📋 Code Quality: ✅ LGTM
No issues found. The guard is scoped correctly around newContext(), the inCallback flag is reset with KJ_DEFER, and the bad-tag counter is still checked after the context is created.
📝 Documentation: ✅ LGTM
No issues found. The header comments describe the new data argument and the guard's behavior accurately.
Reviewed commit: c8e232ff — same changes as abfd0644, so this is that commit's review (no new review was run; line numbers are as of abfd0644)
V8 runs the context deserializer's embedder callbacks under DisallowGarbageCollection, which only a debug build of V8 checks. A GC that starts there in a release build runs on a half-restored context. While a context is created from a startup snapshot, a GC prologue callback now aborts the process if a GC starts inside deserializeInternalFields() or deserializeApiWrapperCallback().
Both callbacks now take the WrappableDeserializeMetadata, which also holds the internal-field findings.