| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #include "src/builtins.h" |     5 #include "src/builtins.h" | 
|     6  |     6  | 
|     7 #include "src/api-arguments.h" |     7 #include "src/api-arguments.h" | 
|     8 #include "src/api-natives.h" |     8 #include "src/api-natives.h" | 
|     9 #include "src/api.h" |     9 #include "src/api.h" | 
|    10 #include "src/base/once.h" |    10 #include "src/base/once.h" | 
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1464       } |  1464       } | 
|  1465       Handle<JSArray> array(JSArray::cast(arg), isolate); |  1465       Handle<JSArray> array(JSArray::cast(arg), isolate); | 
|  1466       if (!IsSimpleArray(isolate, array)) { |  1466       if (!IsSimpleArray(isolate, array)) { | 
|  1467         return MaybeHandle<JSArray>(); |  1467         return MaybeHandle<JSArray>(); | 
|  1468       } |  1468       } | 
|  1469       // The Array length is guaranted to be <= kHalfOfMaxInt thus we won't |  1469       // The Array length is guaranted to be <= kHalfOfMaxInt thus we won't | 
|  1470       // overflow. |  1470       // overflow. | 
|  1471       result_len += Smi::cast(array->length())->value(); |  1471       result_len += Smi::cast(array->length())->value(); | 
|  1472       DCHECK(result_len >= 0); |  1472       DCHECK(result_len >= 0); | 
|  1473       // Throw an Error if we overflow the FixedArray limits |  1473       // Throw an Error if we overflow the FixedArray limits | 
|  1474       if (FixedArray::kMaxLength < result_len) { |  1474       if (FixedDoubleArray::kMaxLength < result_len || | 
 |  1475           FixedArray::kMaxLength < result_len) { | 
|  1475         AllowHeapAllocation gc; |  1476         AllowHeapAllocation gc; | 
|  1476         THROW_NEW_ERROR(isolate, |  1477         THROW_NEW_ERROR(isolate, | 
|  1477                         NewRangeError(MessageTemplate::kInvalidArrayLength), |  1478                         NewRangeError(MessageTemplate::kInvalidArrayLength), | 
|  1478                         JSArray); |  1479                         JSArray); | 
|  1479       } |  1480       } | 
|  1480     } |  1481     } | 
|  1481   } |  1482   } | 
|  1482   return ElementsAccessor::Concat(isolate, args, n_arguments, result_len); |  1483   return ElementsAccessor::Concat(isolate, args, n_arguments, result_len); | 
|  1483 } |  1484 } | 
|  1484  |  1485  | 
| (...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5520 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) |  5521 BUILTIN_LIST_T(DEFINE_BUILTIN_ACCESSOR_T) | 
|  5521 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) |  5522 BUILTIN_LIST_H(DEFINE_BUILTIN_ACCESSOR_H) | 
|  5522 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) |  5523 BUILTIN_LIST_DEBUG_A(DEFINE_BUILTIN_ACCESSOR_A) | 
|  5523 #undef DEFINE_BUILTIN_ACCESSOR_C |  5524 #undef DEFINE_BUILTIN_ACCESSOR_C | 
|  5524 #undef DEFINE_BUILTIN_ACCESSOR_A |  5525 #undef DEFINE_BUILTIN_ACCESSOR_A | 
|  5525 #undef DEFINE_BUILTIN_ACCESSOR_T |  5526 #undef DEFINE_BUILTIN_ACCESSOR_T | 
|  5526 #undef DEFINE_BUILTIN_ACCESSOR_H |  5527 #undef DEFINE_BUILTIN_ACCESSOR_H | 
|  5527  |  5528  | 
|  5528 }  // namespace internal |  5529 }  // namespace internal | 
|  5529 }  // namespace v8 |  5530 }  // namespace v8 | 
| OLD | NEW |