OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.VBox} | 7 * @extends {WebInspector.VBox} |
8 * @implements {WebInspector.TargetManager.Observer} | 8 * @implements {WebInspector.TargetManager.Observer} |
9 */ | 9 */ |
10 WebInspector.PromisePane = function() | 10 WebInspector.PromisePane = function() |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 } | 456 } |
457 | 457 |
458 /** | 458 /** |
459 * @param {?Protocol.Error} error | 459 * @param {?Protocol.Error} error |
460 * @param {?RuntimeAgent.RemoteObject} promise | 460 * @param {?RuntimeAgent.RemoteObject} promise |
461 */ | 461 */ |
462 function didGetPromiseById(error, promise) | 462 function didGetPromiseById(error, promise) |
463 { | 463 { |
464 if (error || !promise) | 464 if (error || !promise) |
465 return; | 465 return; |
466 | 466 var object = target.runtimeModel.createRemoteObject(promise); |
467 target.consoleAgent().setLastEvaluationResult(promise.objectId); | 467 object.callFunction(dumpIntoConsole); |
468 var message = new WebInspector.ConsoleMessage(target, | 468 object.release(); |
469 WebInspector.ConsoleMe
ssage.MessageSource.Other, | 469 /** |
470 WebInspector.ConsoleMe
ssage.MessageLevel.Log, | 470 * @suppressReceiverCheck |
471 "", | 471 * @this {Object} |
472 WebInspector.ConsoleMe
ssage.MessageType.Log, | 472 */ |
473 undefined, | 473 function dumpIntoConsole() |
474 undefined, | 474 { |
475 undefined, | 475 console.log(this); |
476 undefined, | 476 } |
477 [promise]); | |
478 target.consoleModel.addMessage(message); | |
479 WebInspector.console.show(); | 477 WebInspector.console.show(); |
480 } | 478 } |
481 }, | 479 }, |
482 | 480 |
483 /** | 481 /** |
484 * @param {!Element} element | 482 * @param {!Element} element |
485 * @param {!Event} event | 483 * @param {!Event} event |
486 * @return {!Element|!AnchorBox|undefined} | 484 * @return {!Element|!AnchorBox|undefined} |
487 */ | 485 */ |
488 _getPopoverAnchor: function(element, event) | 486 _getPopoverAnchor: function(element, event) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 } | 640 } |
643 }, | 641 }, |
644 | 642 |
645 reset: function() | 643 reset: function() |
646 { | 644 { |
647 this._hideCollectedPromisesSetting.set(false); | 645 this._hideCollectedPromisesSetting.set(false); |
648 this._promiseStatusFiltersSetting.set({}); | 646 this._promiseStatusFiltersSetting.set({}); |
649 this._textFilterUI.setValue(""); | 647 this._textFilterUI.setValue(""); |
650 } | 648 } |
651 } | 649 } |
OLD | NEW |