| Index: src/factory.cc
|
| diff --git a/src/factory.cc b/src/factory.cc
|
| index 77c84505d8c7411befd94771244caf394bc36706..d790e621c3307973433271e7276bb90e28c0bda8 100644
|
| --- a/src/factory.cc
|
| +++ b/src/factory.cc
|
| @@ -873,18 +873,14 @@ Handle<ByteArray> Factory::NewByteArray(int length, PretenureFlag pretenure) {
|
| }
|
|
|
|
|
| -Handle<ExternalArray> Factory::NewExternalArray(int length,
|
| - ExternalArrayType array_type,
|
| - void* external_pointer,
|
| - PretenureFlag pretenure) {
|
| +Handle<FixedTypedArrayBase> Factory::NewExternalArray(
|
| + int length, ExternalArrayType array_type, void* external_pointer,
|
| + PretenureFlag pretenure) {
|
| DCHECK(0 <= length && length <= Smi::kMaxValue);
|
| - CALL_HEAP_FUNCTION(
|
| - isolate(),
|
| - isolate()->heap()->AllocateExternalArray(length,
|
| - array_type,
|
| - external_pointer,
|
| - pretenure),
|
| - ExternalArray);
|
| + CALL_HEAP_FUNCTION(isolate(),
|
| + isolate()->heap()->AllocateExternalArray(
|
| + length, array_type, external_pointer, pretenure),
|
| + FixedTypedArrayBase);
|
| }
|
|
|
|
|
| @@ -1755,11 +1751,11 @@ ElementsKind GetExternalArrayElementsKind(ExternalArrayType type) {
|
| switch (type) {
|
| #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \
|
| case kExternal##Type##Array: \
|
| - return EXTERNAL_##TYPE##_ELEMENTS;
|
| + return TYPE##_ELEMENTS;
|
| TYPED_ARRAYS(TYPED_ARRAY_CASE)
|
| }
|
| UNREACHABLE();
|
| - return FIRST_EXTERNAL_ARRAY_ELEMENTS_KIND;
|
| + return FIRST_FIXED_TYPED_ARRAY_ELEMENTS_KIND;
|
| #undef TYPED_ARRAY_CASE
|
| }
|
|
|
| @@ -1901,7 +1897,7 @@ Handle<JSTypedArray> Factory::NewJSTypedArray(ExternalArrayType type,
|
| Handle<Object> length_object = NewNumberFromSize(length);
|
| obj->set_length(*length_object);
|
|
|
| - Handle<ExternalArray> elements = NewExternalArray(
|
| + Handle<FixedTypedArrayBase> elements = NewExternalArray(
|
| static_cast<int>(length), type,
|
| static_cast<uint8_t*>(buffer->backing_store()) + byte_offset);
|
| Handle<Map> map = JSObject::GetElementsTransitionMap(obj, elements_kind);
|
|
|