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

Unified Diff: test/debugger/debug/es8/debug-async-liveedit.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
« no previous file with comments | « test/debugger/debug/es6/generators-debug-liveedit.js ('k') | test/debugger/debugger.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/debugger/debug/es8/debug-async-liveedit.js
diff --git a/test/debugger/debug/es8/debug-async-liveedit.js b/test/debugger/debug/es8/debug-async-liveedit.js
index cad314cfadb4bccb6c381b9a2117a38d18a7dcdd..761a24fdfa75526f191ff9efdb5a7b0c07399160 100644
--- a/test/debugger/debug/es8/debug-async-liveedit.js
+++ b/test/debugger/debug/es8/debug-async-liveedit.js
@@ -48,6 +48,25 @@ function MakeFunction() {
assertPromiseValue('Cat', promise);
})();
+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 patch(fun, from, to) {
function debug() {
var log = new Array();
@@ -61,7 +80,7 @@ function patch(fun, from, to) {
print("Change log: " + JSON.stringify(log) + "\n");
}
}
- %ExecuteInDebugContext(debug);
+ ExecuteInDebugContext(debug);
}
// Try to edit a MakeAsyncFunction while it's running, then again while it's
« no previous file with comments | « test/debugger/debug/es6/generators-debug-liveedit.js ('k') | test/debugger/debugger.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698