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

Side by Side Diff: test/mjsunit/es6/debug-promises/throw-finally-caught-all.js

Issue 2267033002: Remove --promise-extra flag (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix syntax for skip Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug --allow-natives-syntax --promise-extra 5 // Flags: --expose-debug-as debug --allow-natives-syntax
6 6
7 // Test debug events when we listen to all exceptions and 7 // Test debug events when we listen to all exceptions and
8 // there is a catch handler for the exception thrown in a Promise, first 8 // there is a catch handler for the exception thrown in a Promise, first
9 // caught by a try-finally, and immediately rethrown. 9 // caught by a try-finally, and immediately rethrown.
10 // We expect a normal Exception debug event to be triggered. 10 // We expect a normal Exception debug event to be triggered.
11 11
12 Debug = debug.Debug; 12 Debug = debug.Debug;
13 13
14 var expected_events = 1; 14 var expected_events = 1;
15 var log = []; 15 var log = [];
16 16
17 var p = new Promise(function(resolve, reject) { 17 var p = new Promise(function(resolve, reject) {
18 log.push("resolve"); 18 log.push("resolve");
19 resolve(); 19 resolve();
20 }); 20 });
21 21
22 var q = p.chain( 22 var q = p.then(
23 function() { 23 function() {
24 log.push("throw"); 24 log.push("throw");
25 try { 25 try {
26 throw new Error("caught"); 26 throw new Error("caught");
27 } finally { 27 } finally {
28 } 28 }
29 }); 29 });
30 30
31 q.catch( 31 q.catch(
32 function(e) { 32 function(e) {
(...skipping 30 matching lines...) Expand all
63 } 63 }
64 } catch (e) { 64 } catch (e) {
65 %AbortJS(e + "\n" + e.stack); 65 %AbortJS(e + "\n" + e.stack);
66 } 66 }
67 } 67 }
68 68
69 %EnqueueMicrotask(checkResult); 69 %EnqueueMicrotask(checkResult);
70 } 70 }
71 71
72 testDone(0); 72 testDone(0);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/debug-promises/throw-caught-uncaught.js ('k') | test/mjsunit/es6/debug-promises/throw-uncaught-all.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698