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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js

Issue 2130203002: [DevTools] Better ExceptionDetails in js_protocol.json (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test Created 4 years, 5 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: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
index 48c38108fc45951178aa924a3b1d48db053e9507..5a33476e82768d8dfe1c45d9f8d8928ae7749c90 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
@@ -69,9 +69,9 @@ WebInspector.JavaScriptCompiler.prototype = {
this.scheduleCompile();
return;
}
- if (!exceptionDetails)
+ if (!exceptionDetails || !Object.hasOwnProperty(exceptionDetails, "lineNumber"))
return;
- this._sourceFrame.uiSourceCode().addLineMessage(WebInspector.UISourceCode.Message.Level.Error, exceptionDetails.text, exceptionDetails.line - 1, exceptionDetails.column + 1);
+ this._sourceFrame.uiSourceCode().addLineMessage(WebInspector.UISourceCode.Message.Level.Error, exceptionDetails.text, /** @type {number} */(exceptionDetails.lineNumber), exceptionDetails.columnNumber);
this._compilationFinishedForTest();
dgozman 2016/07/08 20:28:19 We should call this method even when doing early r
kozy 2016/07/08 20:44:00 Done.
kozy 2016/07/08 22:17:49 Test is based on idea that this method will be cal
}
},

Powered by Google App Engine
This is Rietveld 408576698