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

Unified Diff: src/ast.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/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index c9e4c0f21974a8983024e4bc0b4f1415cccc87e1..31cfee3cac72783cac74aab5d18f1f149ca2b187 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -557,8 +557,7 @@ void ArrayLiteral::BuildConstantElements(Isolate* isolate) {
}
if (array_index != values()->length()) {
- JSArray::SetElementsLength(
- array, handle(Smi::FromInt(array_index), isolate)).Assert();
+ JSArray::SetLength(array, array_index);
}
Handle<FixedArrayBase> element_values(array->elements());
« no previous file with comments | « src/accessors.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698