OLD | NEW |
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 Loading... |
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 } |
OLD | NEW |