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

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

Issue 2664273002: [wasm] Acquire the context for TrapIf from a wasm frame (Closed)
Patch Set: 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/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-wasm.cc
diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc
index d7e1dba54f7f18f10946e1397c49e064d707c1c0..285b0210879dc875fd409455bf91ef82547a4256 100644
--- a/src/runtime/runtime-wasm.cc
+++ b/src/runtime/runtime-wasm.cc
@@ -55,6 +55,14 @@ RUNTIME_FUNCTION(Runtime_WasmGrowMemory) {
Object* ThrowRuntimeError(Isolate* isolate, int message_id, int byte_offset,
Michael Starzinger 2017/02/01 11:36:52 We could add a DCHECK_NULL(isolate->context()) her
ahaas 2017/02/01 11:48:51 Done.
bool patch_source_position) {
HandleScope scope(isolate);
+ StackFrameIterator it(isolate);
+ it.Advance();
+ DCHECK(!it.done());
+ DCHECK(it.frame()->is_wasm());
Clemens Hammacher 2017/01/31 19:20:33 If this is just DCHECKs, we can actually skip them
ahaas 2017/02/01 11:48:51 I removed the DCHECK(!it.done()); and added CHECK(
+ isolate->set_context(*WasmCompiledFrame::cast(it.frame())
titzer 2017/01/31 19:16:08 We should be careful here. I assume that Throw() b
Clemens Hammacher 2017/01/31 19:20:33 I am still not sure if it's really needed, but to
Michael Starzinger 2017/02/01 11:36:52 AFAICT the {Throw} method itself should not change
+ ->wasm_instance()
+ ->compiled_module()
+ ->native_context());
Handle<Object> error_obj = isolate->factory()->NewWasmRuntimeError(
static_cast<MessageTemplate::Template>(message_id));
« no previous file with comments | « src/compiler/x64/code-generator-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698