Commit ac30897d authored by Deepti Gandluri's avatar Deepti Gandluri Committed by Commit Bot

[wasm] Gate registering shared WasmMemory on the grow flag.

Registering shared wasm memory with the memory tracker was implemented to
track which instances need to be upated across threads on grow. As the
growing of memory when it is shared is behind a flag, the registering
should also be gated by the flag so as to not create global handles
that keep the memory alive.

Bug: v8:9075
Change-Id: I379a19413befa281cd384c9167fbc22ba52f4c2c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1646882Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62043}
parent 9b02ce33
......@@ -280,6 +280,8 @@ bool WasmMemoryTracker::FreeWasmMemory(Isolate* isolate,
void WasmMemoryTracker::RegisterWasmMemoryAsShared(
Handle<WasmMemoryObject> object, Isolate* isolate) {
// Only register with the tracker if shared grow is enabled.
if (!FLAG_wasm_grow_shared_memory) return;
const void* backing_store = object->array_buffer().backing_store();
// TODO(V8:8810): This should be a DCHECK, currently some tests do not
// use a full WebAssembly.Memory, and fail on registering so return early.
......
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