Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 93479d89a7daa1e009983eda722e73104a4decd0..be6e9353ded45b3a2718b156b1af1f87596fd0f9 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -10257,11 +10257,12 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArrayKeys) { |
RUNTIME_FUNCTION(MaybeObject*, Runtime_LookupAccessor) { |
ASSERT(args.length() == 3); |
- CONVERT_ARG_CHECKED(JSObject, obj, 0); |
+ CONVERT_ARG_CHECKED(JSReceiver, receiver, 0); |
CONVERT_ARG_CHECKED(String, name, 1); |
CONVERT_SMI_ARG_CHECKED(flag, 2); |
AccessorComponent component = flag == 0 ? ACCESSOR_GETTER : ACCESSOR_SETTER; |
- return obj->LookupAccessor(name, component); |
+ if (!receiver->IsJSObject()) return isolate->heap()->undefined_value(); |
+ return JSObject::cast(receiver)->LookupAccessor(name, component); |
} |