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

Unified Diff: src/api.cc

Issue 2964943002: [wasm] Introduce instance types for WebAssembly.* objects. (Closed)
Patch Set: Address rossberg comments. Created 3 years, 5 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 | src/compiler/types.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 6817735000c8ea8733ca5752eee10998d3b8f731..2a64877f91a3753190f67e19960cbd9c887e5e84 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7703,10 +7703,10 @@ MaybeLocal<Proxy> Proxy::New(Local<Context> context, Local<Object> local_target,
}
Local<String> WasmCompiledModule::GetWasmWireBytes() {
- i::Handle<i::JSObject> obj =
- i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
+ i::Handle<i::WasmModuleObject> obj =
+ i::Handle<i::WasmModuleObject>::cast(Utils::OpenHandle(this));
i::Handle<i::WasmCompiledModule> compiled_part =
- i::handle(i::WasmCompiledModule::cast(obj->GetEmbedderField(0)));
+ i::handle(i::WasmCompiledModule::cast(obj->compiled_module()));
i::Handle<i::String> wire_bytes(compiled_part->module_bytes());
return Local<String>::Cast(Utils::ToLocal(wire_bytes));
}
@@ -7742,10 +7742,10 @@ MaybeLocal<WasmCompiledModule> WasmCompiledModule::FromTransferrableModule(
}
WasmCompiledModule::SerializedModule WasmCompiledModule::Serialize() {
- i::Handle<i::JSObject> obj =
- i::Handle<i::JSObject>::cast(Utils::OpenHandle(this));
+ i::Handle<i::WasmModuleObject> obj =
+ i::Handle<i::WasmModuleObject>::cast(Utils::OpenHandle(this));
i::Handle<i::WasmCompiledModule> compiled_part =
- i::handle(i::WasmCompiledModule::cast(obj->GetEmbedderField(0)));
+ i::handle(i::WasmCompiledModule::cast(obj->compiled_module()));
std::unique_ptr<i::ScriptData> script_data =
i::WasmCompiledModuleSerializer::SerializeWasmModule(obj->GetIsolate(),
« no previous file with comments | « no previous file | src/compiler/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698