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

Unified Diff: src/wasm/module-compiler.cc

Issue 2964943002: [wasm] Introduce instance types for WebAssembly.* objects. (Closed)
Patch Set: Update v8heapconst.py again Created 3 years, 5 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
Index: src/wasm/module-compiler.cc
diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc
index 555ad54c7f481f6737d0b1bfac59b6cadc59a09b..3ba03491f9af667038239217166149055ee04085 100644
--- a/src/wasm/module-compiler.cc
+++ b/src/wasm/module-compiler.cc
@@ -1018,7 +1018,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
//--------------------------------------------------------------------------
// Add instance to Memory object
//--------------------------------------------------------------------------
- DCHECK(wasm::IsWasmInstance(*instance));
+ DCHECK(instance->IsWasmInstanceObject());
if (instance->has_memory_object()) {
instance->memory_object()->AddInstance(isolate_, instance);
}
@@ -1070,7 +1070,7 @@ MaybeHandle<WasmInstanceObject> InstanceBuilder::Build() {
compiled_module_->set_weak_wasm_module(
original.ToHandleChecked()->weak_wasm_module());
}
- module_object_->SetEmbedderField(0, *compiled_module_);
+ module_object_->set_compiled_module(*compiled_module_);
compiled_module_->set_weak_owning_instance(link_to_owning_instance);
GlobalHandles::MakeWeak(
global_handle.location(), global_handle.location(),
@@ -1394,7 +1394,7 @@ int InstanceBuilder::ProcessImports(Handle<FixedArray> code_table,
auto memory = Handle<WasmMemoryObject>::cast(value);
DCHECK(WasmJs::IsWasmMemoryObject(isolate_, memory));
instance->set_memory_object(*memory);
- memory_ = Handle<JSArrayBuffer>(memory->buffer(), isolate_);
+ memory_ = Handle<JSArrayBuffer>(memory->array_buffer(), isolate_);
uint32_t imported_cur_pages = static_cast<uint32_t>(
memory_->byte_length()->Number() / WasmModule::kPageSize);
if (imported_cur_pages < module_->min_mem_pages) {
@@ -1664,7 +1664,6 @@ void InstanceBuilder::ProcessExports(
} else {
memory_object =
Handle<WasmMemoryObject>(instance->memory_object(), isolate_);
- DCHECK(WasmJs::IsWasmMemoryObject(isolate_, memory_object));
memory_object->ResetInstancesLink(isolate_);
}

Powered by Google App Engine
This is Rietveld 408576698