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

Unified Diff: test/mjsunit/es6/promise-internal-setter.js

Issue 1219623005: [es6] Make sure we do not invoke setter when calling Promise.all (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/promise.js ('K') | « src/promise.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/promise-internal-setter.js
diff --git a/test/message/rest-param-object-setter-strict.js b/test/mjsunit/es6/promise-internal-setter.js
similarity index 54%
copy from test/message/rest-param-object-setter-strict.js
copy to test/mjsunit/es6/promise-internal-setter.js
index e3a8f604e64ae75b5941c878c34280f352af7d00..2f2a13772568a8d7cbb69dc1b3e29f50f3370893 100644
--- a/test/message/rest-param-object-setter-strict.js
+++ b/test/mjsunit/es6/promise-internal-setter.js
@@ -1,12 +1,14 @@
// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-//
-// Flags: --harmony-rest-parameters
+
'use strict';
-var _bad = "this should fail!";
-({
- get bad() { return _bad; },
- set bad(...args) { _bad = args[0]; }
+Object.defineProperty(Object.prototype, 'promise', {
+ set(x) {
rossberg 2015/06/29 16:05:53 Nit: I supposed this can be abbreviated to {set: a
arv (Not doing code reviews) 2015/06/29 16:44:59 Done.
+ assertUnreachable();
+ }
});
+
+class P extends Promise {}
+P.all([Promise.resolve('ok')]);
rossberg 2015/06/29 16:05:53 Can you add a case for .race and .defer as well? I
arv (Not doing code reviews) 2015/06/29 16:44:59 It needs to be a function that has a static resolv
« src/promise.js ('K') | « src/promise.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698