Repository navigation
Cleanup after from the startup-snapshot and WrapGlobal changes - #7674
Merged
Merged
Conversation
…ate group 50c66ec switched makeWorkerIsolate() to jsg::newIsolateGroup(), but the startup-snapshot pipeline (0f395f8) reintroduced v8::IsolateGroup::GetDefault() while restructuring that function. On builds with multiple pointer-compression cages this put every Worker in the default group, sharing one cage and its heap limit. Restoring newIsolateGroup() alone would leave the zygote inconsistent: the SnapshotCreator(CreateParams) constructor always allocates its isolate in the default group, while the ArrayBuffer allocator is created for the requested group. Allocate the isolate in the requested group and pass it to the non-owning SnapshotCreator constructor instead. That creator only exits the isolate on destruction, so ~IsolateBase() now always disposes the isolate itself after releasing the creator. workerd's own build does not enable multiple cages, so newIsolateGroup() returns the default group here and behavior is unchanged locally. Addresses review comments on #6908. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
realm_take_resource_templates() returned each persistent handle as a bare usize, which worker.c++ reconstituted into a v8::Global with memcpy. src/rust/AGENTS.md requires V8 handles to cross the bridge as the shared jsg::v8::ffi types so both sides agree on one cxx-verified definition. Return Vec<Global> using the shared struct from v8.rs, and recover each handle on the C++ side with global_from_ffi(). The lib.rs bridge now includes v8.rs.h, so its generated code depends on v8.rs@cxx. Addresses a review comment on #7668. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Slot 4 is ContextPointerSlot::BOOTSTRAP_STATE. The Rust realm lives in the isolate's SET_DATA_RUST_REALM slot, not in a context slot. Addresses a review comment on #7671. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
|
Review: 2 findings (1 blocking, 1 warning). Updates snapshot isolate ownership and Rust V8-handle transfer plumbing. Reviewed commit: d3f73e85 · github run |
jasnell
approved these changes
Oct 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.