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

Unified Diff: src/liveedit-debugger.js

Issue 11421100: Issue 2429, core implementation and the protocol change (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: clean Created 8 years, 1 month 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
« src/liveedit.cc ('K') | « src/liveedit.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/liveedit-debugger.js
diff --git a/src/liveedit-debugger.js b/src/liveedit-debugger.js
index cfcdb818c97e0287a9dd2d0ea37917f0912588ae..68cadebcfd459d2b51ce1426b46189c5567e7a25 100644
--- a/src/liveedit-debugger.js
+++ b/src/liveedit-debugger.js
@@ -76,7 +76,26 @@ Debug.LiveEdit = new function() {
try {
new_compile_info = GatherCompileInfo(new_source, script);
} catch (e) {
- throw new Failure("Failed to compile new version of script: " + e);
+ var failure =
+ new Failure("Failed to compile new version of script: " + e);
+ if (e instanceof SyntaxError) {
+ var details = {
+ type: "liveedit_compile_error",
+ syntaxErrorMessage: e.message
+ };
+ failure.details = details;
Yang 2012/11/28 15:51:28 I'd put this after the following if, even though t
Yang 2012/11/29 16:38:57 I still think this would make sense.
Peter Rybin 2012/11/29 23:16:05 You mean this only line? Done
+ if ("startPosition" in e) {
+ var position_struct = {
+ startPosition: e.startPosition,
+ endPosition: e.endPosition,
+ startLine: e.startLine,
+ startColumn: e.startColumn,
+ endColumn: e.endColumn
+ };
+ details.position = position_struct;
+ }
+ }
+ throw failure;
}
var root_new_node = BuildCodeInfoTree(new_compile_info);
« src/liveedit.cc ('K') | « src/liveedit.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698