OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 if (!uiSourceCode || uiSourceCode._evaluationIndex !== evaluationInd
ex) | 216 if (!uiSourceCode || uiSourceCode._evaluationIndex !== evaluationInd
ex) |
217 return; | 217 return; |
218 | 218 |
219 if (error) { | 219 if (error) { |
220 console.error(error); | 220 console.error(error); |
221 return; | 221 return; |
222 } | 222 } |
223 | 223 |
224 if (!scriptId) { | 224 if (!scriptId) { |
225 var consoleMessage = new WebInspector.ConsoleMessage( | 225 var consoleMessage = new WebInspector.ConsoleMessage( |
| 226 WebInspector.console.target(), |
226 WebInspector.ConsoleMessage.MessageSource.JS, | 227 WebInspector.ConsoleMessage.MessageSource.JS, |
227 WebInspector.ConsoleMessage.MessageLevel.Error, | 228 WebInspector.ConsoleMessage.MessageLevel.Error, |
228 syntaxErrorMessage || ""); | 229 syntaxErrorMessage || ""); |
229 WebInspector.console.addMessage(consoleMessage); | 230 WebInspector.console.addMessage(consoleMessage); |
230 return; | 231 return; |
231 } | 232 } |
232 | 233 |
233 var breakpointLocations = this._removeBreakpoints(uiSourceCode); | 234 var breakpointLocations = this._removeBreakpoints(uiSourceCode); |
234 this._restoreBreakpoints(uiSourceCode, breakpointLocations); | 235 this._restoreBreakpoints(uiSourceCode, breakpointLocations); |
235 | 236 |
(...skipping 26 matching lines...) Expand all Loading... |
262 } | 263 } |
263 }, | 264 }, |
264 | 265 |
265 /** | 266 /** |
266 * @param {?RuntimeAgent.RemoteObject} result | 267 * @param {?RuntimeAgent.RemoteObject} result |
267 * @param {boolean=} wasThrown | 268 * @param {boolean=} wasThrown |
268 */ | 269 */ |
269 _printRunScriptResult: function(result, wasThrown) | 270 _printRunScriptResult: function(result, wasThrown) |
270 { | 271 { |
271 var level = (wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Error
: WebInspector.ConsoleMessage.MessageLevel.Log); | 272 var level = (wasThrown ? WebInspector.ConsoleMessage.MessageLevel.Error
: WebInspector.ConsoleMessage.MessageLevel.Log); |
272 var message = new WebInspector.ConsoleMessage( | 273 var message = new WebInspector.ConsoleMessage(WebInspector.console.targe
t(), |
273 WebInspector.ConsoleMessage.MessageSource.JS, | 274 WebInspector.ConsoleMessage.MessageSource.JS, |
274 level, | 275 level, |
275 "", | 276 "", |
276 undefined, | 277 undefined, |
277 undefined, | 278 undefined, |
278 undefined, | 279 undefined, |
279 undefined, | 280 undefined, |
280 undefined, | 281 undefined, |
281 [result]); | 282 [result]); |
282 WebInspector.console.addMessage(message); | 283 WebInspector.console.addMessage(message); |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 this._model.deleteScriptSnippet(path); | 691 this._model.deleteScriptSnippet(path); |
691 }, | 692 }, |
692 | 693 |
693 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype | 694 __proto__: WebInspector.ContentProviderBasedProjectDelegate.prototype |
694 } | 695 } |
695 | 696 |
696 /** | 697 /** |
697 * @type {!WebInspector.ScriptSnippetModel} | 698 * @type {!WebInspector.ScriptSnippetModel} |
698 */ | 699 */ |
699 WebInspector.scriptSnippetModel; | 700 WebInspector.scriptSnippetModel; |
OLD | NEW |