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

Unified Diff: src/api.cc

Issue 2424623002: [wasm] Use a Managed<WasmModule> to hold metadata about modules. (Closed)
Patch Set: 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/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')
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 6ab515c879cfccff67eddb4bf10c113e17e1efdc..f0cf830cfcae80aadb75efd2df8843d60b5b9cd4 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -7191,12 +7191,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();
Mircea Trofin 2016/10/15 17:38:39 Consider the scenario when we try to deserialize f
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());
@@ -7225,7 +7222,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/compiler/wasm-compiler.cc » ('j') | src/compiler/wasm-compiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698