diff options
Diffstat (limited to 'src/objects.cc')
-rw-r--r-- | src/objects.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/objects.cc b/src/objects.cc index 208c75b8..904cf524 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -8521,7 +8521,7 @@ MaybeObject* JSObject::SetFastDoubleElementsCapacityAndLength( // We should never end in here with a pixel or external array. ASSERT(!HasExternalArrayElements()); - FixedDoubleArray* elems; + FixedArrayBase* elems; { MaybeObject* maybe_obj = heap->AllocateUninitializedFixedDoubleArray(capacity); if (!maybe_obj->To(&elems)) return maybe_obj; @@ -9672,9 +9672,10 @@ MaybeObject* JSObject::TransitionElementsKind(ElementsKind to_kind) { ElementsKind from_kind = map()->elements_kind(); Isolate* isolate = GetIsolate(); - if (from_kind == FAST_SMI_ONLY_ELEMENTS && - (to_kind == FAST_ELEMENTS || - elements() == isolate->heap()->empty_fixed_array())) { + if ((from_kind == FAST_SMI_ONLY_ELEMENTS || + elements() == isolate->heap()->empty_fixed_array()) && + to_kind == FAST_ELEMENTS) { + ASSERT(from_kind != FAST_ELEMENTS); MaybeObject* maybe_new_map = GetElementsTransitionMap(isolate, to_kind); Map* new_map; if (!maybe_new_map->To(&new_map)) return maybe_new_map; |