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

Side by Side Diff: test/debugger/debug/debug-liveedit-replace-code.js

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: rebase 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
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 Debug = debug.Debug
6 var counter = 0;
7 var exception = null;
8
9 function f() {
10 if (++counter > 5) return;
11 debugger;
12 return counter;
13 }
14
15 function listener(event, exec_state, event_data, data) {
16 if (event != Debug.DebugEvent.Break) return;
17 try {
18 var script = Debug.findScript(f);
19 var original = 'debugger;';
20 var patch = 'debugger;\n';
21 var position = script.source.indexOf(original);
22 Debug.LiveEdit.TestApi.ApplySingleChunkPatch(
23 script, position, original.length, patch, []);
24 } catch (e) {
25 exception = e;
26 }
27 }
28
29 Debug.setListener(listener);
30 f();
31 Debug.setListener(null);
32 assertNull(exception);
33 assertEquals(6, counter);
OLDNEW
« no previous file with comments | « test/debugger/debug/debug-liveedit-check-stack.js ('k') | test/debugger/debug/es6/debug-liveedit-new-target-1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698