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

Unified Diff: src/array.js

Issue 649063003: Array.prototype.{slice,splice} should use [[DefineOwnProperty]] to generate return value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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 | test/mjsunit/regress/regress-423633.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index b6f3a89d698fee679b4ae1a6e9c5c2eb9d8da969..d9db77b2a48914fefe4585695404c1b8758f0d73 100644
--- a/src/array.js
+++ b/src/array.js
@@ -286,7 +286,9 @@ function SimpleSlice(array, start_i, del_count, len, deleted_elements) {
// prototype.
var current = array[index];
if (!IS_UNDEFINED(current) || index in array) {
Michael Starzinger 2014/10/21 08:07:48 I know this is not part of your change, but the or
- deleted_elements[i] = current;
+ // The spec requires [[DefineOwnProperty]] here, %AddElement is close
+ // enough (in that it ignores the prototype).
+ %AddElement(deleted_elements, i, current, NONE);
}
}
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-423633.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698