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

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

Issue 2629853004: [wasm] Skip serialization of breakpoints and certion stubs (Closed)
Patch Set: Move implementation to .cc file Created 3 years, 11 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 | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-objects.cc
diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
index 464c1427eff20516a73a711e16d066625bfe630c..de3e3b0e569aa2c7a312749bffbabc7495d0fef3 100644
--- a/src/wasm/wasm-objects.cc
+++ b/src/wasm/wasm-objects.cc
@@ -563,9 +563,19 @@ bool WasmSharedModuleData::is_asm_js() {
return asm_js;
}
-void WasmSharedModuleData::RecreateModuleWrapper(
+void WasmSharedModuleData::ReinitializeAfterDeserialization(
Isolate* isolate, Handle<WasmSharedModuleData> shared) {
DCHECK(shared->get(kModuleWrapper)->IsUndefined(isolate));
+#ifdef DEBUG
+ // No BreakpointInfo objects should survive deserialization.
+ if (shared->has_breakpoint_infos()) {
+ for (int i = 0, e = shared->breakpoint_infos()->length(); i < e; ++i) {
+ DCHECK(shared->breakpoint_infos()->get(i)->IsUndefined(isolate));
+ }
+ }
+#endif
+
+ shared->set(kBreakPointInfos, isolate->heap()->undefined_value());
WasmModule* module = nullptr;
{
@@ -788,7 +798,7 @@ void WasmCompiledModule::PrintInstancesChain() {
#endif
}
-void WasmCompiledModule::RecreateModuleWrapper(
+void WasmCompiledModule::ReinitializeAfterDeserialization(
Isolate* isolate, Handle<WasmCompiledModule> compiled_module) {
// This method must only be called immediately after deserialization.
// At this point, no module wrapper exists, so the shared module data is
@@ -797,7 +807,7 @@ void WasmCompiledModule::RecreateModuleWrapper(
static_cast<WasmSharedModuleData*>(compiled_module->get(kID_shared)),
isolate);
DCHECK(!WasmSharedModuleData::IsWasmSharedModuleData(*shared));
- WasmSharedModuleData::RecreateModuleWrapper(isolate, shared);
+ WasmSharedModuleData::ReinitializeAfterDeserialization(isolate, shared);
DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*shared));
}
« no previous file with comments | « src/wasm/wasm-objects.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698