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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 useCommandLineAPI = !!useCommandLineAPI; | 143 useCommandLineAPI = !!useCommandLineAPI; |
144 var target = executionContext.target(); | 144 var target = executionContext.target(); |
145 | 145 |
146 var commandMessage = new WebInspector.ConsoleMessage(target, WebInspector.Co
nsoleMessage.MessageSource.JS, null, text, WebInspector.ConsoleMessage.MessageTy
pe.Command); | 146 var commandMessage = new WebInspector.ConsoleMessage(target, WebInspector.Co
nsoleMessage.MessageSource.JS, null, text, WebInspector.ConsoleMessage.MessageTy
pe.Command); |
147 target.consoleModel.addMessage(commandMessage); | 147 target.consoleModel.addMessage(commandMessage); |
148 | 148 |
149 /** | 149 /** |
150 * @param {?WebInspector.RemoteObject} result | 150 * @param {?WebInspector.RemoteObject} result |
151 * @param {boolean} wasThrown | 151 * @param {boolean} wasThrown |
152 * @param {?RuntimeAgent.RemoteObject=} valueResult | 152 * @param {?RuntimeAgent.RemoteObject=} valueResult |
| 153 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails |
153 * @this {WebInspector.ConsoleModel} | 154 * @this {WebInspector.ConsoleModel} |
154 */ | 155 */ |
155 function printResult(result, wasThrown, valueResult) | 156 function printResult(result, wasThrown, valueResult, exceptionDetails) |
156 { | 157 { |
157 if (!result) | 158 if (!result) |
158 return; | 159 return; |
159 | 160 |
160 WebInspector.console.show(); | 161 WebInspector.console.show(); |
161 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, {result: result, wasThrown: wasThrown, text: text, commandMessage: comm
andMessage}); | 162 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, {result: result, wasThrown: wasThrown, text: text, commandMessage: comm
andMessage, exceptionDetails: exceptionDetails}); |
162 } | 163 } |
163 | 164 |
164 executionContext.evaluate(text, "console", useCommandLineAPI, false, false,
true, printResult.bind(target.consoleModel)); | 165 executionContext.evaluate(text, "console", useCommandLineAPI, false, false,
true, printResult.bind(target.consoleModel)); |
165 | 166 |
166 WebInspector.userMetrics.ConsoleEvaluated.record(); | 167 WebInspector.userMetrics.ConsoleEvaluated.record(); |
167 } | 168 } |
168 | 169 |
169 | 170 |
170 /** | 171 /** |
171 * @constructor | 172 * @constructor |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); | 537 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv
aluated, event.data); |
537 }, | 538 }, |
538 | 539 |
539 __proto__: WebInspector.Object.prototype | 540 __proto__: WebInspector.Object.prototype |
540 } | 541 } |
541 | 542 |
542 /** | 543 /** |
543 * @type {!WebInspector.MultitargetConsoleModel} | 544 * @type {!WebInspector.MultitargetConsoleModel} |
544 */ | 545 */ |
545 WebInspector.multitargetConsoleModel; | 546 WebInspector.multitargetConsoleModel; |
OLD | NEW |