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

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

Issue 2284683005: [wasm] Use weak reference for wasm deopt data. (Closed)
Patch Set: Created 4 years, 4 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
Index: src/runtime/runtime-wasm.cc
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc
index 37608e61cda6f90265fa093519affcdd18360548..c6f214c89888926a011d91f5498d38ee17e73c63 100644
--- a/src/runtime/runtime-wasm.cc
+++ b/src/runtime/runtime-wasm.cc
@@ -37,10 +37,11 @@ RUNTIME_FUNCTION(Runtime_WasmGrowMemory) {
Memory::Address_at(entry + StandardFrameConstants::kCallerPCOffset);
Code* code =
isolate->inner_pointer_to_code_cache()->GetCacheEntry(pc)->code;
- FixedArray* deopt_data = code->deoptimization_data();
- DCHECK(deopt_data->length() == 2);
- module_object = Handle<JSObject>::cast(handle(deopt_data->get(0), isolate));
- CHECK(!module_object->IsNull(isolate));
+ Object* undefined = *isolate->factory()->undefined_value();
+ Object* owning_instance = wasm::GetOwningWasmInstance(undefined, code);
+ CHECK_NOT_NULL(owning_instance);
+ CHECK_NE(owning_instance, undefined);
+ module_object = handle(JSObject::cast(owning_instance), isolate);
}
Address old_mem_start, new_mem_start;
« no previous file with comments | « src/frames.cc ('k') | src/wasm/wasm-module.h » ('j') | src/wasm/wasm-module.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698