Index: src/wasm/wasm-module.cc |
diff --git a/src/wasm/wasm-module.cc b/src/wasm/wasm-module.cc |
index 4f0b885ee020c91fd12bc500dab0d8a9643b6aa2..12593233f86e08dc394d501972fdddd65a470113 100644 |
--- a/src/wasm/wasm-module.cc |
+++ b/src/wasm/wasm-module.cc |
@@ -1297,6 +1297,12 @@ MaybeHandle<JSObject> WasmModule::Instantiate(Isolate* isolate, |
UNREACHABLE(); |
} |
} |
+ Handle<HeapNumber> size_as_object = factory->NewHeapNumber( |
+ static_cast<double>( |
+ compiled_module->GetValueChecked<HeapNumber>(isolate, kMemSize) |
+ ->value()), |
+ MUTABLE, TENURED); |
+ compiled_module->set(kMemSize, *size_as_object); |
RecordStats(isolate, code_table); |
} else { |
// There was no owner, so we can reuse the original. |