| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 useCommandLineAPI = !!useCommandLineAPI; | 167 useCommandLineAPI = !!useCommandLineAPI; |
| 168 var target = executionContext.target(); | 168 var target = executionContext.target(); |
| 169 | 169 |
| 170 var commandMessage = new WebInspector.ConsoleMessage(target, WebInspector.Co
nsoleMessage.MessageSource.JS, null, text, WebInspector.ConsoleMessage.MessageTy
pe.Command); | 170 var commandMessage = new WebInspector.ConsoleMessage(target, WebInspector.Co
nsoleMessage.MessageSource.JS, null, text, WebInspector.ConsoleMessage.MessageTy
pe.Command); |
| 171 target.consoleModel.addMessage(commandMessage); | 171 target.consoleModel.addMessage(commandMessage); |
| 172 | 172 |
| 173 /** | 173 /** |
| 174 * @param {?WebInspector.RemoteObject} result | 174 * @param {?WebInspector.RemoteObject} result |
| 175 * @param {boolean} wasThrown | 175 * @param {boolean} wasThrown |
| 176 * @param {?RuntimeAgent.RemoteObject=} valueResult | 176 * @param {?RuntimeAgent.RemoteObject=} valueResult |
| 177 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails |
| 177 * @this {WebInspector.ConsoleModel} | 178 * @this {WebInspector.ConsoleModel} |
| 178 */ | 179 */ |
| 179 function printResult(result, wasThrown, valueResult) | 180 function printResult(result, wasThrown, valueResult, exceptionDetails) |
| 180 { | 181 { |
| 181 if (!result) | 182 if (!result) |
| 182 return; | 183 return; |
| 183 | 184 |
| 184 this.show(); | 185 this.show(); |
| 185 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, {result: result, wasThrown: wasThrown, text: text, commandMessage: comm
andMessage}); | 186 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, {result: result, wasThrown: wasThrown, text: text, commandMessage: comm
andMessage, exceptionDetails: exceptionDetails}); |
| 186 } | 187 } |
| 187 | 188 |
| 188 executionContext.evaluate(text, "console", useCommandLineAPI, false, false,
true, printResult.bind(target.consoleModel)); | 189 executionContext.evaluate(text, "console", useCommandLineAPI, false, false,
true, printResult.bind(target.consoleModel)); |
| 189 | 190 |
| 190 WebInspector.userMetrics.ConsoleEvaluated.record(); | 191 WebInspector.userMetrics.ConsoleEvaluated.record(); |
| 191 } | 192 } |
| 192 | 193 |
| 193 | 194 |
| 194 /** | 195 /** |
| 195 * @constructor | 196 * @constructor |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 { | 488 { |
| 488 if (!WebInspector.settings.preserveConsoleLog.get()) | 489 if (!WebInspector.settings.preserveConsoleLog.get()) |
| 489 this._console.clearMessages(); | 490 this._console.clearMessages(); |
| 490 } | 491 } |
| 491 } | 492 } |
| 492 | 493 |
| 493 /** | 494 /** |
| 494 * @type {!WebInspector.ConsoleModel} | 495 * @type {!WebInspector.ConsoleModel} |
| 495 */ | 496 */ |
| 496 WebInspector.consoleModel; | 497 WebInspector.consoleModel; |
| OLD | NEW |