Index: src/runtime/runtime-function.cc |
diff --git a/src/runtime/runtime-function.cc b/src/runtime/runtime-function.cc |
index 80896e935b3773a9eb508749f07ea69f7b614c1b..939bd53e6a82799a6ce53a466fb4074a8146964c 100644 |
--- a/src/runtime/runtime-function.cc |
+++ b/src/runtime/runtime-function.cc |
@@ -280,7 +280,10 @@ |
HandleScope scope(isolate); |
DCHECK(args.length() == 1); |
CONVERT_ARG_HANDLE_CHECKED(Object, receiver, 0); |
- return *Object::ConvertReceiver(isolate, receiver).ToHandleChecked(); |
+ if (receiver->IsNull() || receiver->IsUndefined()) { |
+ return isolate->global_proxy(); |
+ } |
+ return *Object::ToObject(isolate, receiver).ToHandleChecked(); |
} |