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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.JavaScriptSourceFrame} sourceFrame 7 * @param {!WebInspector.JavaScriptSourceFrame} sourceFrame
8 */ 8 */
9 WebInspector.JavaScriptCompiler = function(sourceFrame) 9 WebInspector.JavaScriptCompiler = function(sourceFrame)
10 { 10 {
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 function compileCallback(target, scriptId, exceptionDetails) 66 function compileCallback(target, scriptId, exceptionDetails)
67 { 67 {
68 this._compiling = false; 68 this._compiling = false;
69 if (this._recompileScheduled) { 69 if (this._recompileScheduled) {
70 delete this._recompileScheduled; 70 delete this._recompileScheduled;
71 this.scheduleCompile(); 71 this.scheduleCompile();
72 return; 72 return;
73 } 73 }
74 if (!exceptionDetails) 74 if (!exceptionDetails)
75 return; 75 return;
76 var message = new WebInspector.SourceFrameMessage(exceptionDetails.t ext, WebInspector.SourceFrameMessage.Level.Error, exceptionDetails.line - 1, exc eptionDetails.column + 1); 76 var startLine = exceptionDetails.line - 1;
77 var startColumn = exceptionDetails.column + 1;
78 var location = new WebInspector.TextRange(startLine, startColumn, st artLine, startColumn);
79 var message = new WebInspector.SourceFrameMessage(exceptionDetails.t ext, WebInspector.UISourceCodeMessage.Level.Error, location);
77 this._sourceFrame.addMessageToSource(message); 80 this._sourceFrame.addMessageToSource(message);
78 this._compilationFinishedForTest(); 81 this._compilationFinishedForTest();
79 } 82 }
80 }, 83 },
81 84
82 _compilationFinishedForTest: function() {} 85 _compilationFinishedForTest: function() {}
83 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698