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

Side by Side Diff: test/debugger/debug/debug-evaluate-no-side-effect-async.js

Issue 2707043003: [debugger] add more tests to side-effect free debug evaluate. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-iife.js » ('j') | 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 // Flags: --ignition
6
7 // Test that asynchronous features do not work with
8 // side-effect free debug-evaluate.
9
10 Debug = debug.Debug
11
12 var exception = null;
13
14 function* generator() {
15 yield 1;
16 }
17
18 async function async() {
19 return 1;
20 }
21
22 var g = generator();
23
24 function listener(event, exec_state, event_data, data) {
25 if (event != Debug.DebugEvent.Break) return;
26 try {
27 function fail(source) {
28 assertThrows(() => exec_state.frame(0).evaluate(source, true),
29 EvalError);
30 }
31 fail("new Promise()");
32 fail("generator()");
33 fail("g.next()");
34 fail("async()");
35 } catch (e) {
36 exception = e;
37 print(e, e.stack);
38 };
39 };
40
41 // Add the debug event listener.
42 Debug.setListener(listener);
43
44 function f() {
45 debugger;
46 };
47
48 f();
49
50 assertNull(exception);
OLDNEW
« no previous file with comments | « no previous file | test/debugger/debug/debug-evaluate-no-side-effect-iife.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698