Chromium Code Reviews| 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))); |
| } |