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

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

Issue 2291043002: [wasm] Use the native_context for the TypeError in ToJS() (Closed)
Patch Set: 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 | « no previous file | test/mjsunit/wasm/ffi-error.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 30c545ec515bb07c2459b52b11dc25d3e1fcedd9..f825e7a4d29c2634e5a61f7f638b2c4948bc5c0d 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -2197,11 +2197,11 @@ Node* WasmGraphBuilder::ToJS(Node* node, wasm::LocalType type) {
case wasm::kAstI32:
return BuildChangeInt32ToTagged(node);
case wasm::kAstI64:
- DCHECK(module_ && !module_->instance->context.is_null());
- // Throw a TypeError.
+ // Throw a TypeError. The native context is good enough here because we
+ // only throw a TypeError.
return BuildCallToRuntime(Runtime::kWasmThrowTypeError, jsgraph(),
- module_->instance->context, nullptr, 0, effect_,
- *control_);
+ jsgraph()->isolate()->native_context(), nullptr,
+ 0, effect_, *control_);
case wasm::kAstF32:
node = graph()->NewNode(jsgraph()->machine()->ChangeFloat32ToFloat64(),
node);
« no previous file with comments | « no previous file | test/mjsunit/wasm/ffi-error.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698