| Index: src/runtime.cc
|
| diff --git a/src/runtime.cc b/src/runtime.cc
|
| index c6b26493ce9bcdf709248177842db4348d6736be..7f79bb817c3adc34f49708725946d96db9a54a1d 100644
|
| --- a/src/runtime.cc
|
| +++ b/src/runtime.cc
|
| @@ -10127,7 +10127,8 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetFrameDetails) {
|
|
|
| // Get scope info and read from it for local variable information.
|
| Handle<JSFunction> function(JSFunction::cast(it.frame()->function()));
|
| - Handle<SerializedScopeInfo> scope_info(function->shared()->scope_info());
|
| + Handle<SharedFunctionInfo> shared(function->shared());
|
| + Handle<SerializedScopeInfo> scope_info(shared->scope_info());
|
| ASSERT(*scope_info != SerializedScopeInfo::Empty());
|
| ScopeInfo<> info(*scope_info);
|
|
|
| @@ -10299,10 +10300,11 @@ 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
|
| + if (!receiver->IsJSObject() && !shared->strict_mode() && !shared->native()) {
|
| + // If the receiver is not a JSObject and the function is not a
|
| + // builtin or strict-mode 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();
|
|
|