Make {StackFrame::unchecked_code} fail gracefully.
This makes sure that all overrides of {StackFrame::unchecked_code} return a value, even if there is no {Code} object associated with the frame. This ensures debug functions like {StackTraceFailureMessage} continue working for all stack traces. R=neis@chromium.org BUG=chromium:952761 Change-Id: Ie42b301e4d43ebf67acc80e6c1b7bcb4cdc7c947 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1566515 Reviewed-by: Georg Neis <neis@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#60844}
This commit is contained in:
parent
c7b43ae5f3
commit
97bad6be44
@ -620,7 +620,7 @@ Code ConstructEntryFrame::unchecked_code() const {
|
||||
return isolate()->heap()->builtin(Builtins::kJSConstructEntry);
|
||||
}
|
||||
|
||||
Code ExitFrame::unchecked_code() const { UNREACHABLE(); }
|
||||
Code ExitFrame::unchecked_code() const { return Code(); }
|
||||
|
||||
void ExitFrame::ComputeCallerState(State* state) const {
|
||||
// Set up the caller state.
|
||||
@ -1793,7 +1793,7 @@ Address InternalFrame::GetCallerStackPointer() const {
|
||||
return fp() + StandardFrameConstants::kCallerSPOffset;
|
||||
}
|
||||
|
||||
Code InternalFrame::unchecked_code() const { UNREACHABLE(); }
|
||||
Code InternalFrame::unchecked_code() const { return Code(); }
|
||||
|
||||
void WasmCompiledFrame::Print(StringStream* accumulator, PrintMode mode,
|
||||
int index) const {
|
||||
@ -1928,7 +1928,7 @@ void WasmInterpreterEntryFrame::Summarize(
|
||||
}
|
||||
}
|
||||
|
||||
Code WasmInterpreterEntryFrame::unchecked_code() const { UNREACHABLE(); }
|
||||
Code WasmInterpreterEntryFrame::unchecked_code() const { return Code(); }
|
||||
|
||||
WasmInstanceObject WasmInterpreterEntryFrame::wasm_instance() const {
|
||||
const int offset = WasmCompiledFrameConstants::kWasmInstanceOffset;
|
||||
|
@ -530,7 +530,6 @@ StackTraceFailureMessage::StackTraceFailureMessage(Isolate* isolate, void* ptr1,
|
||||
size_t i = 0;
|
||||
StackFrameIterator it(isolate);
|
||||
for (; !it.done() && i < code_objects_length; it.Advance()) {
|
||||
if (it.frame()->type() == StackFrame::INTERNAL) continue;
|
||||
code_objects_[i++] =
|
||||
reinterpret_cast<void*>(it.frame()->unchecked_code().ptr());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user