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

Side by Side Diff: test/mjsunit/regress/regress-crbug-481896.js

Issue 1157543004: Debugger: PreservePositionScope should clear positions inside the scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: only break at inline caches if it owns a statement position. Created 5 years, 6 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 | « src/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 2015 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: --expose-debug-as debug
6
7 function static() {
8 print("> static"); // Break
9 }
10
11 var Debug = debug.Debug;
12 var exception = null;
13 var break_count = 0;
14
15 function listener(event, exec_state, event_data, data) {
16 if (event != Debug.DebugEvent.Break) return;
17 try {
18 print("breakpoint hit at " + exec_state.frame(0).sourceLineText());
19 assertTrue(exec_state.frame(0).sourceLineText().indexOf("// Break") > 0);
20 break_count++;
21 } catch (e) {
22 exception = e;
23 }
24 }
25
26 Debug.setListener(listener);
27
28 function install() {
29 eval("this.dynamic = function dynamic() { \n" +
30 " print(\"> dynamic\"); // Break\n" +
31 "}\n" +
32 "//@ sourceURL=dynamicScript");
33 }
34
35 install();
36
37 var scripts = Debug.scripts();
38 var dynamic_script;
39 var static_script;
40 for (var script of scripts) {
41 if (script.source_url == "dynamicScript") dynamic_script = script;
42 if (script.source_url == "staticScript") static_script = script;
43 }
44
45 Debug.setScriptBreakPointById(dynamic_script.id, 1);
46 Debug.setScriptBreakPointById(static_script.id, 7);
47
48 dynamic();
49 static();
50
51 Debug.setListener(null);
52
53 assertNull(exception);
54 assertEquals(2, break_count);
55
56 //@ sourceURL=staticScript
OLDNEW
« no previous file with comments | « src/debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698