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

Side by Side 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 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 * @this {WebInspector.JavaScriptCompiler} 62 * @this {WebInspector.JavaScriptCompiler}
63 */ 63 */
64 function compileCallback(target, scriptId, exceptionDetails) 64 function compileCallback(target, scriptId, exceptionDetails)
65 { 65 {
66 this._compiling = false; 66 this._compiling = false;
67 if (this._recompileScheduled) { 67 if (this._recompileScheduled) {
68 delete this._recompileScheduled; 68 delete this._recompileScheduled;
69 this.scheduleCompile(); 69 this.scheduleCompile();
70 return; 70 return;
71 } 71 }
72 if (!exceptionDetails) 72 if (!exceptionDetails || !Object.hasOwnProperty(exceptionDetails, "l ineNumber"))
73 return; 73 return;
74 this._sourceFrame.uiSourceCode().addLineMessage(WebInspector.UISourc eCode.Message.Level.Error, exceptionDetails.text, exceptionDetails.line - 1, exc eptionDetails.column + 1); 74 this._sourceFrame.uiSourceCode().addLineMessage(WebInspector.UISourc eCode.Message.Level.Error, exceptionDetails.text, /** @type {number} */(exceptio nDetails.lineNumber), exceptionDetails.columnNumber);
75 this._compilationFinishedForTest(); 75 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
76 } 76 }
77 }, 77 },
78 78
79 _compilationFinishedForTest: function() {} 79 _compilationFinishedForTest: function() {}
80 } 80 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698