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

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

Issue 1416793005: Devtools: API To set the red/yellow squiggles for a file via DI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update API with feedback from cl Created 5 years, 2 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 05a061e2f6c5a06ee3c31a0794e2fdac66bf2cd6..81f766ef1fa77550857e4e6f49296e92813709d0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptCompiler.js
@@ -73,7 +73,10 @@ WebInspector.JavaScriptCompiler.prototype = {
}
if (!exceptionDetails)
return;
- var message = new WebInspector.SourceFrameMessage(exceptionDetails.text, WebInspector.SourceFrameMessage.Level.Error, exceptionDetails.line - 1, exceptionDetails.column + 1);
+ var startLine = exceptionDetails.line - 1;
+ var startColumn = exceptionDetails.column + 1;
+ var location = new WebInspector.TextRange(startLine, startColumn, startLine, startColumn);
+ var message = new WebInspector.SourceFrameMessage(exceptionDetails.text, WebInspector.UISourceCodeMessage.Level.Error, location);
this._sourceFrame.addMessageToSource(message);
this._compilationFinishedForTest();
}

Powered by Google App Engine
This is Rietveld 408576698