| Index: src/runtime/runtime-array.cc
|
| diff --git a/src/runtime/runtime-array.cc b/src/runtime/runtime-array.cc
|
| index c468673dd5298f472a91d1a89edbdbf7ba4d2877..806af12b55b3631e9818d1af24a9e5746ae0d118 100644
|
| --- a/src/runtime/runtime-array.cc
|
| +++ b/src/runtime/runtime-array.cc
|
| @@ -724,17 +724,18 @@ static bool IterateElements(Isolate* isolate, Handle<JSObject> receiver,
|
| static bool IsConcatSpreadable(Isolate* isolate, Handle<Object> obj) {
|
| HandleScope handle_scope(isolate);
|
| if (!obj->IsSpecObject()) return false;
|
| - if (obj->IsJSArray()) return true;
|
| if (FLAG_harmony_arrays) {
|
| Handle<Symbol> key(isolate->factory()->is_concat_spreadable_symbol());
|
| Handle<Object> value;
|
| MaybeHandle<Object> maybeValue =
|
| i::Runtime::GetObjectProperty(isolate, obj, key);
|
| if (maybeValue.ToHandle(&value)) {
|
| - return value->BooleanValue();
|
| + if (!value->IsUndefined()) {
|
| + return value->BooleanValue();
|
| + }
|
| }
|
| }
|
| - return false;
|
| + return obj->IsJSArray();
|
| }
|
|
|
|
|
|
|