Index: src/builtins/builtins-internal.cc |
diff --git a/src/builtins/builtins-internal.cc b/src/builtins/builtins-internal.cc |
index b5858c64927e9849809cad4ff77fe0b3407d7ca7..bec6ff36450223c02fc312f1f51fd7c75bafae7a 100644 |
--- a/src/builtins/builtins-internal.cc |
+++ b/src/builtins/builtins-internal.cc |
@@ -108,9 +108,8 @@ void Builtins::Generate_GrowFastDoubleElements(CodeStubAssembler* assembler) { |
Label runtime(assembler, CodeStubAssembler::Label::kDeferred); |
Node* elements = assembler->LoadElements(object); |
- elements = assembler->CheckAndGrowElementsCapacity( |
- context, elements, FAST_DOUBLE_ELEMENTS, key, &runtime); |
- assembler->StoreObjectField(object, JSObject::kElementsOffset, elements); |
+ elements = assembler->TryGrowElementsCapacity( |
+ object, elements, FAST_DOUBLE_ELEMENTS, key, &runtime); |
assembler->Return(elements); |
assembler->Bind(&runtime); |
@@ -129,9 +128,8 @@ void Builtins::Generate_GrowFastSmiOrObjectElements( |
Label runtime(assembler, CodeStubAssembler::Label::kDeferred); |
Node* elements = assembler->LoadElements(object); |
- elements = assembler->CheckAndGrowElementsCapacity( |
- context, elements, FAST_ELEMENTS, key, &runtime); |
- assembler->StoreObjectField(object, JSObject::kElementsOffset, elements); |
+ elements = assembler->TryGrowElementsCapacity(object, elements, FAST_ELEMENTS, |
+ key, &runtime); |
assembler->Return(elements); |
assembler->Bind(&runtime); |