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

Side by Side Diff: test/debugger/debug/es8/async-debug-builtin-predictions.js

Issue 2731273002: [debug] add exception predictions to builtins where missing. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« test/cctest/test-debug.cc ('K') | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 Debug = debug.Debug
6
7 var exception = null;
8
9 function listener(event, exec_state, event_data, data) {
10 if (event != Debug.DebugEvent.Exception) return;
11 try {
12 var line = exec_state.frame(0).sourceLineText();
13 var match = /Exception/.exec(line);
14 assertNotNull(match);
15 } catch (e) {
16 exception = e;
17 }
18 }
19
20 // Caught throw, events on any exception.
21 Debug.setListener(listener);
22 Debug.setBreakOnException();
23
24 var thenable = {
25 get then() {
26 throw new Error(); // Exception
27 }
28 };
29
30 var p = Promise.resolve(thenable);
31
32 async function foo() {
33 await thenable;
34 }
35
36 foo();
37
38 %RunMicrotasks();
39
40 Debug.setListener(null);
41 Debug.clearBreakOnException();
42 assertNull(exception);
OLDNEW
« test/cctest/test-debug.cc ('K') | « test/cctest/test-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698