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

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: Fix tests 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
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..393a65a12227ceaa303bafffbc7b9ff8a949ebc8 100644
--- a/test/mjsunit/es6/array-concat.js
+++ b/test/mjsunit/es6/array-concat.js
@@ -872,3 +872,24 @@ 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];
+ }
+ }
+
+ var p = Proxy.revocable(target, handler);
+ assertThrows(function() { [].concat(p.proxy); }, TypeError);
+
+ p = Proxy.revocable(target, handler);
+ target = {};
+ target.__proto__ = p.proxy;
+ assertThrows(function() { [].concat({ __proto__: p.proxy }); }, TypeError);
neis 2016/07/11 09:25:19 Unfortunately the test file is a bit screwed up: t
caitp 2016/07/11 11:12:08 Thanks for the info, will do
+})();
« src/builtins.cc ('K') | « src/builtins.cc ('k') | test/test262/test262.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698