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

Unified Diff: src/value-serializer.cc

Issue 2490663002: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. (Closed)
Patch Set: [wasm] Move all heap-allocated WASM structures into wasm-objects.h. Created 4 years, 1 month 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 | « src/v8.gyp ('k') | src/wasm/wasm-debug.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/value-serializer.cc
diff --git a/src/value-serializer.cc b/src/value-serializer.cc
index 8dfb27c4445819ad0b22654942f8c22305f690c0..c9a9f213136f1925c4b04d7bdfdf9c05b5946022 100644
--- a/src/value-serializer.cc
+++ b/src/value-serializer.cc
@@ -17,6 +17,7 @@
#include "src/snapshot/code-serializer.h"
#include "src/transitions.h"
#include "src/wasm/wasm-module.h"
+#include "src/wasm/wasm-objects.h"
#include "src/wasm/wasm-result.h"
namespace v8 {
@@ -739,8 +740,8 @@ Maybe<bool> ValueSerializer::WriteJSArrayBufferView(JSArrayBufferView* view) {
}
Maybe<bool> ValueSerializer::WriteWasmModule(Handle<JSObject> object) {
- Handle<wasm::WasmCompiledModule> compiled_part(
- wasm::WasmCompiledModule::cast(object->GetInternalField(0)), isolate_);
+ Handle<WasmCompiledModule> compiled_part(
+ WasmCompiledModule::cast(object->GetInternalField(0)), isolate_);
WasmEncodingTag encoding_tag = WasmEncodingTag::kRawBytes;
WriteTag(SerializationTag::kWasmModule);
WriteRawBytes(&encoding_tag, sizeof(encoding_tag));
@@ -1508,9 +1509,8 @@ MaybeHandle<JSObject> ValueDeserializer::ReadWasmModule() {
if (WasmCompiledModuleSerializer::DeserializeWasmModule(
isolate_, &script_data, wire_bytes)
.ToHandle(&compiled_part)) {
- return wasm::CreateWasmModuleObject(
- isolate_, Handle<wasm::WasmCompiledModule>::cast(compiled_part),
- wasm::ModuleOrigin::kWasmOrigin);
+ return WasmModuleObject::New(
+ isolate_, Handle<WasmCompiledModule>::cast(compiled_part));
}
// If that fails, recompile.
« no previous file with comments | « src/v8.gyp ('k') | src/wasm/wasm-debug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698