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

Side by Side Diff: test/debugger/regress/regress-5901-1.js

Issue 2664793002: [debugger] account for inlined functions when stepping. (Closed)
Patch Set: comment addressed 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 | « test/cctest/test-debug.cc ('k') | test/debugger/regress/regress-5901-2.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 --turbo
6
7 function f() {
8 throw new Error();
9 }
10
11 function g() {
12 try {
13 f();
14 } catch (e) {
15 return 1; // Break
16 }
17 }
18
19 function h() {
20 return g();
21 }
22
23 h();
24 h();
25
26 var Debug = debug.Debug;
27 var step_count = 0;
28 var exception = null;
29
30 function listener(event, exec_state, event_data, data) {
31 if (event == Debug.DebugEvent.Exception) {
32 step_count++;
33 exec_state.prepareStep(Debug.StepAction.StepNext);
34 } else if (event == Debug.DebugEvent.Break) {
35 step_count++;
36 try {
37 assertTrue(exec_state.frame().sourceLineText().includes('Break'));
38 } catch (e) {
39 exception = e;
40 print(e);
41 }
42 }
43 }
44
45 Debug.setListener(listener);
46 Debug.setBreakOnException();
47 % OptimizeFunctionOnNextCall(h);
48 h();
49 Debug.setListener(null);
50 assertNull(exception);
OLDNEW
« no previous file with comments | « test/cctest/test-debug.cc ('k') | test/debugger/regress/regress-5901-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698