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

Unified Diff: test/debugger/debug/es6/generators-debug-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
Index: test/debugger/debug/es6/generators-debug-liveedit.js
diff --git a/test/debugger/debug/es6/generators-debug-liveedit.js b/test/debugger/debug/es6/generators-debug-liveedit.js
index 1fe039c2fc02486f69263b787e4ce9a7f5c22783..3ae359a541a4be79fcb5a9b02cdcb8ab02c77473 100644
--- a/test/debugger/debug/es6/generators-debug-liveedit.js
+++ b/test/debugger/debug/es6/generators-debug-liveedit.js
@@ -41,6 +41,25 @@ function MakeFunction() {
assertIteratorResult("Cat", true, iter.next());
})();
+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();
@@ -53,7 +72,7 @@ function patch(fun, from, to) {
print("Change log: " + JSON.stringify(log) + "\n");
}
}
- %ExecuteInDebugContext(debug);
+ ExecuteInDebugContext(debug);
}
// Try to edit a MakeGenerator while it's running, then again while it's
« no previous file with comments | « test/debugger/debug/es6/debug-liveedit-new-target-3.js ('k') | test/debugger/debug/es8/debug-async-liveedit.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698