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

Unified Diff: src/js/array.js

Issue 1849723002: Version 5.0.71.27 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 9 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 | « include/v8-version.h ('k') | test/mjsunit/array-sort.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/array.js
diff --git a/src/js/array.js b/src/js/array.js
index b8cf3ff5d222a3fb65266a9539890b218b1b30d4..0a5e2839efc56147da915e207a50ce4bf4ac5b8a 100644
--- a/src/js/array.js
+++ b/src/js/array.js
@@ -1056,7 +1056,7 @@ function InnerArraySort(array, length, comparefn) {
var CopyFromPrototype = function CopyFromPrototype(obj, length) {
var max = 0;
for (var proto = %_GetPrototype(obj); proto; proto = %_GetPrototype(proto)) {
- var indices = %GetArrayKeys(proto, length);
+ var indices = IS_PROXY(proto) ? length : %GetArrayKeys(proto, length);
if (IS_NUMBER(indices)) {
// It's an interval.
var proto_length = indices;
@@ -1085,7 +1085,7 @@ function InnerArraySort(array, length, comparefn) {
// elements in that range.
var ShadowPrototypeElements = function(obj, from, to) {
for (var proto = %_GetPrototype(obj); proto; proto = %_GetPrototype(proto)) {
- var indices = %GetArrayKeys(proto, to);
+ var indices = IS_PROXY(proto) ? to : %GetArrayKeys(proto, to);
if (IS_NUMBER(indices)) {
// It's an interval.
var proto_length = indices;
« no previous file with comments | « include/v8-version.h ('k') | test/mjsunit/array-sort.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698