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

Unified Diff: src/objects.cc

Issue 1189423002: Don't roundtrip to JS to update the length. This is 1) faster (although we don't care) and 2) avoid… (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index d63c9e08882ecda10952962aa53881db676f472f..000423212f5ec5866d2d578214210112c5cccd2a 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -12018,9 +12018,9 @@ MaybeHandle<Object> JSArray::SetElementsLength(
.Assert();
}
- SetProperty(deleted, isolate->factory()->length_string(),
- isolate->factory()->NewNumberFromUint(delete_count),
- STRICT).Assert();
+ ElementsAccessor* accessor = deleted->GetElementsAccessor();
+ accessor->SetLength(deleted, isolate->factory()->NewNumberFromUint(
+ delete_count)).Check();
}
RETURN_ON_EXCEPTION(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698