Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index 78d2b8a038feb2fda955af5b39a24dd2d74ad1ea..b5a202cb28871f550558463c5b7ceb0ca4fd55b1 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -4672,6 +4672,13 @@ void JSObject::TransformToFastProperties(Handle<JSObject> object, |
} |
+void JSObject::ResetElements(Handle<JSObject> object) { |
+ CALL_HEAP_FUNCTION_VOID( |
+ object->GetIsolate(), |
+ object->ResetElements()); |
+} |
+ |
+ |
static Handle<SeededNumberDictionary> CopyFastElementsToDictionary( |
Handle<FixedArrayBase> array, |
int length, |
@@ -11183,7 +11190,7 @@ Handle<FixedArray> JSObject::SetFastElementsCapacityAndLength( |
? GetElementsTransitionMap(object, new_elements_kind) |
: handle(object->map()); |
object->ValidateElements(); |
- object->set_map_and_elements(*new_map, *new_elements); |
+ JSObject::SetMapAndElements(object, new_map, new_elements); |
// Transition through the allocation site as well if present. |
JSObject::UpdateAllocationSite(object, new_elements_kind); |
@@ -11229,7 +11236,7 @@ void JSObject::SetFastDoubleElementsCapacityAndLength(Handle<JSObject> object, |
accessor->CopyElements(object, elems, elements_kind); |
object->ValidateElements(); |
- object->set_map_and_elements(*new_map, *elems); |
+ JSObject::SetMapAndElements(object, new_map, elems); |
if (FLAG_trace_elements_transitions) { |
PrintElementsTransition(stdout, object, elements_kind, old_elements, |
@@ -14369,7 +14376,7 @@ Handle<Object> JSObject::PrepareElementsForSort(Handle<JSObject> object, |
dict->CopyValuesTo(*fast_elements); |
object->ValidateElements(); |
- object->set_map_and_elements(*new_map, *fast_elements); |
+ JSObject::SetMapAndElements(object, new_map, fast_elements); |
} else if (object->HasExternalArrayElements() || |
object->HasFixedTypedArrayElements()) { |
// Typed arrays cannot have holes or undefined elements. |
@@ -16363,7 +16370,7 @@ Handle<JSArrayBuffer> JSTypedArray::MaterializeArrayBuffer( |
buffer->set_weak_first_view(*typed_array); |
ASSERT(typed_array->weak_next() == isolate->heap()->undefined_value()); |
typed_array->set_buffer(*buffer); |
- typed_array->set_map_and_elements(*new_map, *new_elements); |
+ JSObject::SetMapAndElements(typed_array, new_map, new_elements); |
return buffer; |
} |