Commit 229cc17f authored by jfb's avatar jfb Committed by Commit bot

wasm: hook abstract code

We'll require the abstract code (as well as the offset) when we do full backtraces.

R=bradnelson@chromium.org, titzer@chromium.org

Review URL: https://codereview.chromium.org/1838933002

Cr-Commit-Position: refs/heads/master@{#35116}
parent 18b44702
......@@ -429,13 +429,17 @@ Handle<Object> Isolate::CaptureSimpleStackTrace(Handle<JSObject> error_object,
} break;
case StackFrame::WASM: {
WasmFrame* wasm_frame = WasmFrame::cast(frame);
Code* code = wasm_frame->unchecked_code();
Handle<AbstractCode> abstract_code =
Handle<AbstractCode>(AbstractCode::cast(code));
Handle<JSFunction> fun = factory()->NewFunction(
factory()->NewStringFromAsciiChecked("<WASM>"));
elements = MaybeGrow(this, elements, cursor, cursor + 4);
// TODO(jfb) Pass module object.
elements->set(cursor++, *factory()->undefined_value());
elements->set(cursor++, *fun);
elements->set(cursor++, Internals::IntToSmi(0));
elements->set(cursor++, *abstract_code);
elements->set(cursor++, Internals::IntToSmi(0));
frames_seen++;
} break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment