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

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

Issue 2664273002: [wasm] Acquire the context for TrapIf from a wasm frame (Closed)
Patch Set: Add DCHECK_NULL(isolate->context()); Created 3 years, 11 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 | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('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 08ab36dc1ab6a64a59e45a2312e13e038f0b80f3..b6b64f65656fba5c15ac31ed6908b6da8c4393ee 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -91,7 +91,9 @@ Node* BuildCallToRuntime(Runtime::FunctionId f, JSGraph* jsgraph,
inputs[count++] = jsgraph->ExternalConstant(
ExternalReference(f, jsgraph->isolate())); // ref
inputs[count++] = jsgraph->Int32Constant(fun->nargs); // arity
- inputs[count++] = jsgraph->HeapConstant(context); // context
+ inputs[count++] = context.is_null()
+ ? jsgraph->SmiConstant(0)
+ : jsgraph->HeapConstant(context); // context
inputs[count++] = *effect_ptr;
inputs[count++] = control;
@@ -328,7 +330,7 @@ class WasmTrapHelper : public ZoneObject {
Node* parameters[] = {trap_reason_smi, // message id
trap_position_smi}; // byte position
BuildCallToRuntime(Runtime::kThrowWasmError, jsgraph(),
- module->instance->context, parameters,
+ Handle<Context>::null(), parameters,
arraysize(parameters), effect_ptr, *control_ptr);
}
if (false) {
« no previous file with comments | « src/compiler/mips64/code-generator-mips64.cc ('k') | src/compiler/x64/code-generator-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698