Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(48)

Unified Diff: src/builtins.cc

Issue 1191313003: More cleanup related to setting array.length (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/ast.cc ('k') | src/elements.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index fe58a0953cd72e76a672c64eefd43427715f30f6..35f164841e2ab283a87bd8665f2a12bd144e71ea 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -445,15 +445,12 @@ BUILTIN(ArrayPop) {
return CallJsBuiltin(isolate, "$arrayPop", args);
}
- ElementsAccessor* accessor = array->GetElementsAccessor();
uint32_t new_length = len - 1;
Handle<Object> element;
ASSIGN_RETURN_FAILURE_ON_EXCEPTION(
isolate, element, Object::GetElement(isolate, array, new_length));
- RETURN_FAILURE_ON_EXCEPTION(
- isolate,
- accessor->SetLength(array, handle(Smi::FromInt(new_length), isolate)));
+ JSArray::SetLength(array, new_length);
return *element;
}
« no previous file with comments | « src/ast.cc ('k') | src/elements.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698