| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index c10111aaa1ea93ff77c032717a28bedc2116da49..c3dd8d1887ef6630a0aa6e478b8df7f911ad88e1 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -537,7 +537,7 @@ Handle<ExternalArray> Factory::NewExternalArray(int length,
|
| ExternalArrayType array_type,
|
| void* external_pointer,
|
| PretenureFlag pretenure) {
|
| - ASSERT(0 <= length);
|
| + ASSERT(0 <= length && length <= Smi::kMaxValue);
|
| CALL_HEAP_FUNCTION(
|
| isolate(),
|
| isolate()->heap()->AllocateExternalArray(length,
|
| @@ -548,6 +548,20 @@ Handle<ExternalArray> Factory::NewExternalArray(int length,
|
| }
|
|
|
|
|
| +Handle<FixedTypedArrayBase> Factory::NewFixedTypedArray(
|
| + int length,
|
| + ExternalArrayType array_type,
|
| + PretenureFlag pretenure) {
|
| + ASSERT(0 <= length && length <= Smi::kMaxValue);
|
| + CALL_HEAP_FUNCTION(
|
| + isolate(),
|
| + isolate()->heap()->AllocateFixedTypedArray(length,
|
| + array_type,
|
| + pretenure),
|
| + FixedTypedArrayBase);
|
| +}
|
| +
|
| +
|
| Handle<Cell> Factory::NewCell(Handle<Object> value) {
|
| AllowDeferredHandleDereference convert_to_cell;
|
| CALL_HEAP_FUNCTION(
|
|
|