Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index d94c75fa0e135cf11f4d9fe1cd270124eeb891d5..ab013037689c092fc9bd2a10cdb5b55e987b5e58 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -702,25 +702,7 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) { |
// Add the receiver (same as in function frame). |
Handle<Object> receiver(it.frame()->receiver(), isolate); |
DCHECK(!function->shared()->IsBuiltin()); |
- if (!receiver->IsJSObject() && is_sloppy(shared->language_mode())) { |
- // 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 function's native context. |
- // See ECMA-262 6.0, 9.2.1.2, 6 b iii. |
- if (receiver->IsUndefined()) { |
- receiver = handle(function->global_proxy()); |
- } else { |
- Context* context = function->context(); |
- Handle<Context> native_context(Context::cast(context->native_context())); |
- if (!Object::ToObject(isolate, receiver, native_context) |
- .ToHandle(&receiver)) { |
- // This only happens if the receiver is forcibly set in %_CallFunction. |
- return heap->undefined_value(); |
- } |
- } |
- } |
+ DCHECK_IMPLIES(is_sloppy(shared->language_mode()), receiver->IsJSReceiver()); |
details->set(kFrameDetailsReceiverIndex, *receiver); |
DCHECK_EQ(details_size, details_index); |