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

Unified Diff: src/builtins.cc

Issue 1340033002: builtins.cc return PackedElementsKind where applicable (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fullstop Created 5 years, 3 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 | src/elements.cc » ('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 a68a15ad5d45cefaf2662ac829bec44fa21834df..dacd7ae5dbf0237a9b9900e42a2a2c81dafbaa70 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -526,8 +526,8 @@ BUILTIN(ArraySlice) {
(relative_end < 0) ? Max(len + relative_end, 0) : Min(relative_end, len);
if (actual_end <= actual_start) {
- Handle<JSArray> result_array =
- isolate->factory()->NewJSArray(object->GetElementsKind(), 0, 0);
+ Handle<JSArray> result_array = isolate->factory()->NewJSArray(
+ GetPackedElementsKind(object->GetElementsKind()), 0, 0);
return *result_array;
}
« no previous file with comments | « no previous file | src/elements.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698