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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.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/JavaScriptSourceFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index d13fd1ae314352c1bf269004caab5212c3482605..bd33d94dec978e5925e6a81b9f35f3903eb5bf4c 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -393,7 +393,10 @@ WebInspector.JavaScriptSourceFrame.prototype = {
var compileError = errorData.compileError;
if (compileError) {
var messageText = WebInspector.UIString("LiveEdit compile failed: %s", compileError.message);
- var message = new WebInspector.SourceFrameMessage(messageText, WebInspector.SourceFrameMessage.Level.Error, compileError.lineNumber - 1, compileError.columnNumber + 1);
+ var startLine = compileError.lineNumber - 1;
+ var endLine = compileError.columnNumber + 1;
+ var location = new WebInspector.TextRange(startLine, endLine, startLine, endLine);
+ var message = new WebInspector.SourceFrameMessage(messageText, WebInspector.UISourceCodeMessage.Level.Error, location);
this.addMessageToSource(message);
} else {
WebInspector.console.addMessage(WebInspector.UIString("Unknown LiveEdit error: %s; %s", JSON.stringify(errorData), error), warningLevel);

Powered by Google App Engine
This is Rietveld 408576698