Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index bba06d96bf8d450ed1de69837bf4c5a756aa2bf0..b4259c4a5cdb67e99597d55c8b0a29c228ca3eb8 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -4315,11 +4315,11 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_HasProperty) { |
NoHandleAllocation na; |
ASSERT(args.length() == 2); |
- // Only JS objects can have properties. |
- if (args[0]->IsJSObject()) { |
- JSObject* object = JSObject::cast(args[0]); |
+ // Only JS receivers can have properties. |
+ if (args[0]->IsJSReceiver()) { |
+ JSReceiver* receiver = JSReceiver::cast(args[0]); |
CONVERT_CHECKED(String, key, args[1]); |
- if (object->HasProperty(key)) return isolate->heap()->true_value(); |
+ if (receiver->HasProperty(key)) return isolate->heap()->true_value(); |
} |
return isolate->heap()->false_value(); |
} |