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

Side by Side Diff: test/mjsunit/debug-liveedit-stepin.js

Issue 1973213003: [liveedit] fix stepping after replacing bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditbreaks
Patch Set: add another testcase Created 4 years, 7 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/mjsunit/debug-liveedit-exceptions.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug 5 // Flags: --expose-debug-as debug
6 6
7 Debug = debug.Debug 7 Debug = debug.Debug
8 8
9 function BestEditor() { 9 function BestEditor() {
10 var best_editor = "Emacs"; 10 return 'Emacs';
11 return best_editor;
12 } 11 }
13 12
14 var exception = null; 13 var exception = null;
15 var results = []; 14 var results = [];
16 var log = [] 15 var log = []
17 16
18 function listener(event, exec_state, event_data, data) { 17 function listener(event, exec_state, event_data, data) {
19 if (event != Debug.DebugEvent.Break) return; 18 if (event != Debug.DebugEvent.Break) return;
20 try { 19 try {
21 var source_line = event_data.sourceLineText(); 20 var source_line = event_data.sourceLineText();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 results.push(BestEditor()); 54 results.push(BestEditor());
56 results.push(BestEditor()); 55 results.push(BestEditor());
57 Debug.setListener(null); 56 Debug.setListener(null);
58 57
59 assertNull(exception); 58 assertNull(exception);
60 assertEquals(["Emacs", "Eclipse", "Vim"], results); 59 assertEquals(["Emacs", "Eclipse", "Vim"], results);
61 print(JSON.stringify(log, 1)); 60 print(JSON.stringify(log, 1));
62 assertEquals([ 61 assertEquals([
63 "debugger;", 62 "debugger;",
64 "results.push(BestEditor());", 63 "results.push(BestEditor());",
65 " var best_editor = \"Emacs\";", 64 " return 'Emacs';","}",
66 " return best_editor;","}",
67 "results.push(BestEditor());", 65 "results.push(BestEditor());",
68 "results.push(BestEditor());", 66 "results.push(BestEditor());",
69 " var best_editor = \"Emacs\";", 67 " return 'Emacs';",
70 " return best_editor;", 68 " return 'Eclipse';","}",
71 " var best_editor = \"Eclipse\";",
72 " return best_editor;","}",
73 "results.push(BestEditor());", 69 "results.push(BestEditor());",
74 "results.push(BestEditor());", 70 "results.push(BestEditor());",
75 " var best_editor = \"Eclipse\";", 71 " return 'Eclipse';",
76 " return best_editor;", 72 " return 'Vim';",
77 " var best_editor = \"Vim\";",
78 " return best_editor;",
79 "}","results.push(BestEditor());", 73 "}","results.push(BestEditor());",
80 "Debug.setListener(null);" 74 "Debug.setListener(null);"
81 ], log); 75 ], log);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-liveedit-exceptions.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698