Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index 22985aa731ad73d108b71eca4f40bca5781f3213..d9cb6137df7fd0ecdb2df51493e4bbf9ef10ece0 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -732,9 +732,12 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) { |
} |
// Add the receiver (same as in function frame). |
- Handle<Object> receiver(it.frame()->receiver(), isolate); |
+ Handle<Object> receiver = frame_inspector.summary().receiver(); |
DCHECK(function->shared()->IsUserJavaScript()); |
- DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); |
+ // Optimized frames only restore the receiver as best-effort (see |
+ // OptimizedFrame::Summarize). |
+ DCHECK_IMPLIES(!is_optimized && is_sloppy(shared->language_mode()), |
+ receiver->IsJSReceiver()); |
details->set(kFrameDetailsReceiverIndex, *receiver); |
DCHECK_EQ(details_size, details_index); |