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

Unified Diff: test/mjsunit/es6/array-concat.js

Issue 2131383002: [builtins] take slow path in IsConcatSpreadable if proxy in prototype (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebased Created 4 years, 5 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 | « src/objects.cc ('k') | test/test262/test262.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/array-concat.js
diff --git a/test/mjsunit/es6/array-concat.js b/test/mjsunit/es6/array-concat.js
index 00edfd66c1c52466113f7ef649d40fe209ea9d29..f57c10e03eb8484ac45dbacecb944384fda963ed 100644
--- a/test/mjsunit/es6/array-concat.js
+++ b/test/mjsunit/es6/array-concat.js
@@ -872,3 +872,25 @@ logger.get = function(t, trap, r) {
assertThrows(() => [].concat(obj), TypeError);
assertThrows(() => Array.prototype.concat.apply(obj), TypeError);
})();
+
+(function testConcatRevokedProxy() {
+ "use strict";
+ var target = [];
+ var handler = {
+ get(_, name) {
+ if (name === Symbol.isConcatSpreadable) {
+ p.revoke();
+ }
+ return target[name];
+ }
+ }
+
+ p = Proxy.revocable(target, handler);
+ target = {};
+ target.__proto__ = p.proxy;
+ assertThrows(function() { [].concat({ __proto__: p.proxy }); }, TypeError);
+
+ target = [];
+ var p = Proxy.revocable(target, handler);
+ assertThrows(function() { [].concat(p.proxy); }, TypeError);
+})();
« no previous file with comments | « src/objects.cc ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698