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

Unified Diff: src/api.cc

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: [wasm] Use a Managed<WasmModule> to hold metadata about modules. Created 4 years, 2 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/factory.h » ('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 508431a6f4b64e3ef085e0e067911bf27eece951..3a6ff94a9c34330ce8eb4cdadc55f96a0db69109 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7204,12 +7204,9 @@ WasmCompiledModule::SerializedModule WasmCompiledModule::Serialize() {
i::Handle<i::wasm::WasmCompiledModule> compiled_part =
i::handle(i::wasm::WasmCompiledModule::cast(obj->GetInternalField(0)));
- i::Handle<i::SeqOneByteString> wire_bytes = compiled_part->module_bytes();
- compiled_part->reset_module_bytes();
std::unique_ptr<i::ScriptData> script_data =
i::WasmCompiledModuleSerializer::SerializeWasmModule(obj->GetIsolate(),
compiled_part);
- compiled_part->set_module_bytes(wire_bytes);
script_data->ReleaseDataOwnership();
size_t size = static_cast<size_t>(script_data->length());
@@ -7238,7 +7235,7 @@ MaybeLocal<WasmCompiledModule> WasmCompiledModule::Deserialize(
i::Handle<i::wasm::WasmCompiledModule> compiled_module =
handle(i::wasm::WasmCompiledModule::cast(*compiled_part));
return Local<WasmCompiledModule>::Cast(
- Utils::ToLocal(i::wasm::CreateCompiledModuleObject(
+ Utils::ToLocal(i::wasm::CreateWasmModuleObject(
i_isolate, compiled_module, i::wasm::ModuleOrigin::kWasmOrigin)));
}
« no previous file with comments | « no previous file | src/factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698