Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index c6b26493ce9bcdf709248177842db4348d6736be..6ecc852ee243a3b51c173d5ab2b0bc124fdf656f 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -10299,12 +10299,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFrameDetails) { |
// THIS MUST BE DONE LAST SINCE WE MIGHT ADVANCE |
// THE FRAME ITERATOR TO WRAP THE RECEIVER. |
Handle<Object> receiver(it.frame()->receiver(), isolate); |
- if (!receiver->IsJSObject()) { |
- // If the receiver is NOT a JSObject we have hit an optimization |
- // where a value object is not converted into a wrapped JS objects. |
- // To hide this optimization from the debugger, we wrap the receiver |
- // by creating correct wrapper object based on the calling frame's |
- // global context. |
+ if (!receiver->IsJSObject() && !receiver->IsUndefined()) { |
Vyacheslav Egorov (Chromium)
2011/07/15 12:43:13
I think we should check for strict || builtin func
Mads Ager (chromium)
2011/07/15 16:32:10
D'oh! You are absolutely right. Thank you. :-)
Th
|
+ // If the receiver is not a JSObject and is not undefined we have |
+ // hit an optimization where a value object is not converted into |
+ // a wrapped JS objects. To hide this optimization from the |
+ // debugger, we wrap the receiver by creating correct wrapper |
+ // object based on the calling frame's global context. |
it.Advance(); |
Handle<Context> calling_frames_global_context( |
Context::cast(Context::cast(it.frame()->context())->global_context())); |