Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 620883b28e00450eeb3cd1b3572b668e0d443628..0d6d09caaaf80bcd1509ac5c9e3fcda70631528f 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -815,6 +815,7 @@ Handle<JSArrayBuffer> wasm::SetupArrayBuffer(Isolate* isolate, |
JSArrayBuffer::Setup(buffer, isolate, is_external, backing_store, |
static_cast<int>(size)); |
buffer->set_is_neuterable(false); |
+ buffer->set_is_wasm_buffer(true); |
buffer->set_has_guard_region(enable_guard_regions); |
if (is_external) { |
@@ -1222,6 +1223,7 @@ class InstantiationHelper { |
if (!memory_.is_null()) { |
// Set externally passed ArrayBuffer non neuterable. |
memory_->set_is_neuterable(false); |
+ memory_->set_is_wasm_buffer(true); |
DCHECK_IMPLIES(EnableGuardRegions(), |
module_->is_asm_js() || memory_->has_guard_region()); |