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

Unified Diff: test/debugger/debug/es6/debug-liveedit-new-target-1.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-1.js
diff --git a/test/debugger/debug/es6/debug-liveedit-new-target-1.js b/test/debugger/debug/es6/debug-liveedit-new-target-1.js
index 4beebec90944cbbb371e18fb2956b481e7e75c7a..40dc816b2d9c363e5505d0e60090c78c14cc1d52 100644
--- a/test/debugger/debug/es6/debug-liveedit-new-target-1.js
+++ b/test/debugger/debug/es6/debug-liveedit-new-target-1.js
@@ -22,8 +22,27 @@ eval(`
function Dummy() {}
+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/debug-liveedit-replace-code.js ('k') | test/debugger/debug/es6/debug-liveedit-new-target-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698