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

Unified Diff: test/mjsunit/array-sort.js

Issue 1842563004: [runtime] Don't call GetArrayKeys on proxies. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
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
« src/js/array.js ('K') | « src/js/array.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/array-sort.js
diff --git a/test/mjsunit/array-sort.js b/test/mjsunit/array-sort.js
index beb8b95b014bb402ce7e7fe715b333489e4d913c..ae9f6efa663bb8aa610321898429defb03cb8d10 100644
--- a/test/mjsunit/array-sort.js
+++ b/test/mjsunit/array-sort.js
@@ -466,7 +466,16 @@ function TestSortToObject() {
TestSortToObject();
function TestSortOnProxy() {
- var p = new Proxy([2,1,3], {});
- assertEquals([1,2,3], p.sort());
+ {
+ var p = new Proxy([2,1,3], {});
+ assertEquals([1,2,3], p.sort());
+ }
+
+ {
+ function f() { return arguments };
+ var a = f(2,1,3);
+ a.__proto__ = new Proxy({}, {});
+ assertEquals([1,2,3], [...(Array.prototype.sort.apply(a))]);
+ }
}
TestSortOnProxy();
« src/js/array.js ('K') | « src/js/array.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698