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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 /** | 310 /** |
311 * @this {WebInspector.ExecutionContext} | 311 * @this {WebInspector.ExecutionContext} |
312 * @param {?Protocol.Error} error | 312 * @param {?Protocol.Error} error |
313 * @param {!RuntimeAgent.RemoteObject} result | 313 * @param {!RuntimeAgent.RemoteObject} result |
314 * @param {boolean=} wasThrown | 314 * @param {boolean=} wasThrown |
315 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails | 315 * @param {?DebuggerAgent.ExceptionDetails=} exceptionDetails |
316 */ | 316 */ |
317 function evalCallback(error, result, wasThrown, exceptionDetails) | 317 function evalCallback(error, result, wasThrown, exceptionDetails) |
318 { | 318 { |
319 if (error) { | 319 if (error) { |
| 320 console.error(error); |
320 callback(null, false); | 321 callback(null, false); |
321 return; | 322 return; |
322 } | 323 } |
323 | 324 |
324 if (returnByValue) | 325 if (returnByValue) |
325 callback(null, !!wasThrown, wasThrown ? null : result, exception
Details); | 326 callback(null, !!wasThrown, wasThrown ? null : result, exception
Details); |
326 else | 327 else |
327 callback(this.runtimeModel.createRemoteObject(result), !!wasThro
wn, undefined, exceptionDetails); | 328 callback(this.runtimeModel.createRemoteObject(result), !!wasThro
wn, undefined, exceptionDetails); |
328 } | 329 } |
329 this.target().runtimeAgent().evaluate(expression, objectGroup, includeCo
mmandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, gene
ratePreview, evalCallback.bind(this)); | 330 this.target().runtimeAgent().evaluate(expression, objectGroup, includeCo
mmandLineAPI, doNotPauseOnExceptionsAndMuteConsole, this.id, returnByValue, gene
ratePreview, evalCallback.bind(this)); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
626 /** | 627 /** |
627 * @param {string} listenerType | 628 * @param {string} listenerType |
628 */ | 629 */ |
629 setListenerType: function(listenerType) | 630 setListenerType: function(listenerType) |
630 { | 631 { |
631 this._listenerType = listenerType; | 632 this._listenerType = listenerType; |
632 }, | 633 }, |
633 | 634 |
634 __proto__: WebInspector.SDKObject.prototype | 635 __proto__: WebInspector.SDKObject.prototype |
635 } | 636 } |
OLD | NEW |