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

Unified Diff: test/debugger/debug/es6/debug-liveedit-new-target-3.js

Issue 2636913002: [liveedit] reimplement frame restarting. (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: test/debugger/debug/es6/debug-liveedit-new-target-3.js
diff --git a/test/debugger/debug/es6/debug-liveedit-new-target-3.js b/test/debugger/debug/es6/debug-liveedit-new-target-3.js
index 866323de1a39f5d641ab350c8ef30863b52f0bf4..60ec9a7fa16c2ab7242d7217590289394d5db7ff 100644
--- a/test/debugger/debug/es6/debug-liveedit-new-target-3.js
+++ b/test/debugger/debug/es6/debug-liveedit-new-target-3.js
@@ -24,8 +24,27 @@ eval(`
}
`);
+function ExecuteInDebugContext(f) {
+ var result;
+ var exception = null;
+ Debug.setListener(function(event) {
+ if (event == Debug.DebugEvent.Break) {
+ try {
+ result = f();
+ } catch (e) {
+ // Rethrow this exception later.
+ exception = e;
+ }
+ }
+ });
+ debugger;
+ Debug.setListener(null);
+ if (exception !== null) throw exception;
+ return result;
+}
+
function Replace(fun, original, patch) {
- %ExecuteInDebugContext(function() {
+ ExecuteInDebugContext(function() {
var change_log = [];
try {
var script = Debug.findScript(fun);
« no previous file with comments | « test/debugger/debug/es6/debug-liveedit-new-target-2.js ('k') | test/debugger/debug/es6/generators-debug-liveedit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698