Commit 23917420 authored by Shu-yu Guo's avatar Shu-yu Guo Committed by V8 LUCI CQ

[heap] Require shared RO heap when using shared Isolate

The only exception is when pointer compression is on with a per-Isolate
cage.

Bug: v8:11708
Change-Id: Ice9b0114bc102c20b4151ec66a861ba673934605
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2864563Reviewed-by: 's avatarVictor Gomes <victorgomes@chromium.org>
Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Commit-Queue: Shu-yu Guo <syg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74342}
parent 39c43692
......@@ -1762,6 +1762,16 @@ class V8_EXPORT_PRIVATE Isolate final : private HiddenFactory {
};
void UseAsSharedIsolate() {
// When pointer compression is on with a per-Isolate cage, allocation in the
// shared Isolate can point into the per-Isolate RO heap as the offsets are
// constant across Isolates.
//
// When pointer compression is on with a shared cage or when pointer
// compression is off, a shared RO heap is required. Otherwise a shared
// allocation requested by a client Isolate could point into the client
// Isolate's RO space (e.g. an RO map) whose pages gets unmapped when it is
// disposed.
CHECK(COMPRESS_POINTERS_IN_ISOLATE_CAGE_BOOL || V8_SHARED_RO_HEAP_BOOL);
DCHECK(!is_shared_);
DCHECK_NULL(shared_isolate_);
is_shared_ = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment