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

Unified Diff: src/debug-delay.js

Issue 668246: Check that function being patched has no activations on any thread stack (Closed)
Patch Set: format Created 10 years, 9 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 | « no previous file | src/liveedit.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-delay.js
diff --git a/src/debug-delay.js b/src/debug-delay.js
index 3bf1061df0271dfa8484d266527a7d87825524b9..5ba5a3bb7367f52253e772688cc8b7359d2db6ee 100644
--- a/src/debug-delay.js
+++ b/src/debug-delay.js
@@ -1986,9 +1986,18 @@ DebugCommandProcessor.prototype.changeLiveRequest_ = function(request, response)
}
var change_log = new Array();
- Debug.LiveEditChangeScript(the_script, change_pos, change_len, new_string,
- change_log);
-
+ try {
+ Debug.LiveEditChangeScript(the_script, change_pos, change_len, new_string,
+ change_log);
+ } catch (e) {
+ if (e instanceof Debug.LiveEditChangeScript.Failure) {
+ // Let's treat it as a "success" so that body with change_log will be
+ // sent back. "change_log" will have "failure" field set.
+ change_log.push( { failure: true } );
+ } else {
+ throw e;
+ }
+ }
response.body = {change_log: change_log};
};
« no previous file with comments | « no previous file | src/liveedit.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698