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

Side by Side Diff: test/debugger/regress/regress-5901-2.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/debugger/regress/regress-5901-1.js ('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 function f() {
6 debugger;
7 return 1;
8 }
9
10 function g() {
11 return f();
12 } // Break
13
14 function h() {
15 return g();
16 }
17
18 h();
19 h();
20
21 var Debug = debug.Debug;
22 var step_count = 0;
23 var exception = null;
24
25 function listener(event, exec_state, event_data, data) {
26 if (event != Debug.DebugEvent.Break) return;
27 try {
28 if (step_count == 0) {
29 exec_state.prepareStep(Debug.StepAction.StepOut);
30 } else {
31 assertTrue(exec_state.frame().sourceLineText().includes('Break'));
32 }
33 step_count++;
34 } catch (e) {
35 exception = e;
36 print(e);
37 }
38 }
39
40 Debug.setListener(listener);
41 % OptimizeFunctionOnNextCall(h);
42 h();
43 Debug.setListener(null);
44 assertNull(exception);
45 assertEquals(2, step_count);
OLDNEW
« no previous file with comments | « test/debugger/regress/regress-5901-1.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698