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

Unified Diff: src/api.cc

Issue 2249973002: [wasm] Serialization test using external APIs and contexts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Serialization test using external APIs and contexts 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
« no previous file with comments | « include/v8.h ('k') | src/wasm/wasm-module.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 1573491ff0a6c6e648b2302e097189825850d32c..65964d753baefb57e3c33f56e23522dee9216bd8 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -6833,14 +6833,14 @@ WasmCompiledModule::SerializedModule WasmCompiledModule::Serialize() {
std::unique_ptr<i::ScriptData> script_data =
i::WasmCompiledModuleSerializer::SerializeWasmModule(obj->GetIsolate(),
compiled_part);
+ script_data->ReleaseDataOwnership();
size_t size = static_cast<size_t>(script_data->length());
- script_data.release();
return {std::unique_ptr<const uint8_t[]>(script_data->data()), size};
}
MaybeLocal<WasmCompiledModule> WasmCompiledModule::Deserialize(
Isolate* isolate,
- const WasmCompiledModule::SerializedModule serialized_data) {
+ const WasmCompiledModule::SerializedModule& serialized_data) {
int size = static_cast<int>(serialized_data.second);
i::ScriptData sc(serialized_data.first.get(), size);
i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate);
« no previous file with comments | « include/v8.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698