Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(495)

Unified Diff: src/wasm/wasm-module.cc

Issue 2347333002: [wasm] Fix for cloning module heap size value (Closed)
Patch Set: the fix Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-647649.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « no previous file | test/mjsunit/regress/wasm/regression-647649.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698