inspector: speculative crash fix

We might have empty frame_inspector_ here, let's fast return in this
case.

R=yangguo@chromium.org

Bug: chromium:864920
Change-Id: Ia8012251877bb4e04b7f756db72a3039bca6fa9c
Reviewed-on: https://chromium-review.googlesource.com/1250408
Reviewed-by: Yang Guo <yangguo@chromium.org>
Commit-Queue: Aleksey Kozyatinskiy <kozyatinskiy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56278}
This commit is contained in:
Alexey Kozyatinskiy 2018-09-27 22:36:24 -07:00 committed by Commit Bot
parent 9f8ee83dff
commit ab8fbafd94

View File

@ -117,7 +117,9 @@ v8::MaybeLocal<v8::Value> DebugStackTraceIterator::GetReceiver() const {
v8::Local<v8::Value> DebugStackTraceIterator::GetReturnValue() const {
DCHECK(!Done());
if (frame_inspector_->IsWasm()) return v8::Local<v8::Value>();
if (frame_inspector_ && frame_inspector_->IsWasm()) {
return v8::Local<v8::Value>();
}
bool is_optimized = iterator_.frame()->is_optimized();
if (is_optimized || !is_top_frame_ ||
!isolate_->debug()->IsBreakAtReturn(iterator_.javascript_frame())) {