Fix^2 HasEnumerableElements
Arguments objects can have packed elements too. R=verwaest@chromium.org Review URL: https://codereview.chromium.org/1517073003 Cr-Commit-Position: refs/heads/master@{#32797}
This commit is contained in:
parent
97161a29ed
commit
430bfd1b02
@ -7982,8 +7982,9 @@ bool HasEnumerableElements(JSObject* object) {
|
||||
case FAST_SMI_ELEMENTS:
|
||||
case FAST_ELEMENTS:
|
||||
case FAST_DOUBLE_ELEMENTS: {
|
||||
DCHECK(object->IsJSArray());
|
||||
int length = Smi::cast(JSArray::cast(object)->length())->value();
|
||||
int length = object->IsJSArray()
|
||||
? Smi::cast(JSArray::cast(object)->length())->value()
|
||||
: object->elements()->length();
|
||||
return length > 0;
|
||||
}
|
||||
case FAST_HOLEY_SMI_ELEMENTS:
|
||||
|
Loading…
Reference in New Issue
Block a user