From df841d5a67823004d2115c34f732322916c3dcf8 Mon Sep 17 00:00:00 2001 From: Michael Starzinger Date: Mon, 24 Sep 2018 16:50:49 +0200 Subject: [PATCH] [wasm] Remove dead code from runtime stack walks. R=clemensh@chromium.org Change-Id: Iabbef9d054671ec11a48321bb4e75a49084560ed Reviewed-on: https://chromium-review.googlesource.com/1238925 Reviewed-by: Clemens Hammacher Commit-Queue: Michael Starzinger Cr-Commit-Position: refs/heads/master@{#56198} --- src/runtime/runtime-wasm.cc | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/runtime/runtime-wasm.cc b/src/runtime/runtime-wasm.cc index 6983278055..bc33af591c 100644 --- a/src/runtime/runtime-wasm.cc +++ b/src/runtime/runtime-wasm.cc @@ -29,15 +29,10 @@ Context* GetNativeContextFromWasmInstanceOnStackTop(Isolate* isolate) { // On top: C entry stub. DCHECK_EQ(StackFrame::EXIT, it.frame()->type()); it.Advance(); - // Next: the wasm (compiled or interpreted) frame. - WasmInstanceObject* instance = nullptr; - if (it.frame()->is_wasm_compiled()) { - instance = WasmCompiledFrame::cast(it.frame())->wasm_instance(); - } else { - DCHECK(it.frame()->is_wasm_interpreter_entry()); - instance = WasmInterpreterEntryFrame::cast(it.frame())->wasm_instance(); - } - return instance->native_context(); + // Next: the wasm compiled frame. + DCHECK(it.frame()->is_wasm_compiled()); + WasmCompiledFrame* frame = WasmCompiledFrame::cast(it.frame()); + return frame->wasm_instance()->native_context(); } class ClearThreadInWasmScope {