Chromium Code Reviews| 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)); |