summaryrefslogtreecommitdiff
path: root/chromium/v8/src/wasm/wasm-memory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/v8/src/wasm/wasm-memory.cc')
-rw-r--r--chromium/v8/src/wasm/wasm-memory.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/chromium/v8/src/wasm/wasm-memory.cc b/chromium/v8/src/wasm/wasm-memory.cc
index 914b61244dc..94ec964e19b 100644
--- a/chromium/v8/src/wasm/wasm-memory.cc
+++ b/chromium/v8/src/wasm/wasm-memory.cc
@@ -280,6 +280,8 @@ bool WasmMemoryTracker::FreeMemoryIfIsWasmMemory(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.