OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @extends {WebInspector.Widget} | 7 * @extends {WebInspector.Widget} |
8 */ | 8 */ |
9 WebInspector.ConsolePrompt = function() | 9 WebInspector.ConsolePrompt = function() |
10 { | 10 { |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
178 | 178 |
179 /** | 179 /** |
180 * @param {!RuntimeAgent.ScriptId=} scriptId | 180 * @param {!RuntimeAgent.ScriptId=} scriptId |
181 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails | 181 * @param {?RuntimeAgent.ExceptionDetails=} exceptionDetails |
182 * @this {WebInspector.ConsolePrompt} | 182 * @this {WebInspector.ConsolePrompt} |
183 */ | 183 */ |
184 function compileCallback(scriptId, exceptionDetails) | 184 function compileCallback(scriptId, exceptionDetails) |
185 { | 185 { |
186 if (str !== this.text()) | 186 if (str !== this.text()) |
187 return; | 187 return; |
188 if (exceptionDetails && (exceptionDetails.exception.description === "SyntaxError: Unexpected end of input" | 188 if (exceptionDetails && (exceptionDetails.exception.description.star tsWith("SyntaxError: Unexpected end of input") |
einbinder
2016/10/05 00:04:34
When paused in the debugger, these errors have are
| |
189 || exceptionDetails.exception.description === "SyntaxError: Unte rminated template literal")) { | 189 || exceptionDetails.exception.description.startsWith("SyntaxErro r: Unterminated template literal"))) { |
190 this._editor.newlineAndIndent(); | 190 this._editor.newlineAndIndent(); |
191 this._enterProcessedForTest(); | 191 this._enterProcessedForTest(); |
192 return; | 192 return; |
193 } | 193 } |
194 this._appendCommand(str, true); | 194 this._appendCommand(str, true); |
195 this._enterProcessedForTest(); | 195 this._enterProcessedForTest(); |
196 } | 196 } |
197 }, | 197 }, |
198 | 198 |
199 /** | 199 /** |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 function innerWordsWithPrefix(words) | 285 function innerWordsWithPrefix(words) |
286 { | 286 { |
287 fulfill(words.map(item => ({title:item})).concat(historyWords)); | 287 fulfill(words.map(item => ({title:item})).concat(historyWords)); |
288 } | 288 } |
289 }, | 289 }, |
290 | 290 |
291 _editorSetForTest: function() { }, | 291 _editorSetForTest: function() { }, |
292 | 292 |
293 __proto__: WebInspector.Widget.prototype | 293 __proto__: WebInspector.Widget.prototype |
294 } | 294 } |
OLD | NEW |