Index: src/runtime/runtime-array.cc |
diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc |
index ad374d22b29b874adfb6b4c4c852cedce14739ff..a9cbc208b34e442cc25d4f40dedf46acfba62ded 100644 |
--- a/src/runtime/runtime-array.cc |
+++ b/src/runtime/runtime-array.cc |
@@ -496,8 +496,7 @@ RUNTIME_FUNCTION(Runtime_ArrayIncludes_Slow) { |
// If the receiver is not a special receiver type, and the length is a valid |
// element index, perform fast operation tailored to specific ElementsKinds. |
- if (object->map()->instance_type() > LAST_SPECIAL_RECEIVER_TYPE && |
- len < kMaxUInt32 && |
+ if (!object->map()->IsSpecialReceiverMap() && len < kMaxUInt32 && |
JSObject::PrototypeHasNoElements(isolate, JSObject::cast(*object))) { |
Handle<JSObject> obj = Handle<JSObject>::cast(object); |
ElementsAccessor* elements = obj->GetElementsAccessor(); |
@@ -595,8 +594,7 @@ RUNTIME_FUNCTION(Runtime_ArrayIndexOf) { |
// If the receiver is not a special receiver type, and the length is a valid |
// element index, perform fast operation tailored to specific ElementsKinds. |
- if (object->map()->instance_type() > LAST_SPECIAL_RECEIVER_TYPE && |
- len < kMaxUInt32 && |
+ if (!object->map()->IsSpecialReceiverMap() && len < kMaxUInt32 && |
JSObject::PrototypeHasNoElements(isolate, JSObject::cast(*object))) { |
Handle<JSObject> obj = Handle<JSObject>::cast(object); |
ElementsAccessor* elements = obj->GetElementsAccessor(); |