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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
474 } | 474 } |
475 | 475 |
476 /** | 476 /** |
477 * @param {?Protocol.Error} error | 477 * @param {?Protocol.Error} error |
478 * @param {?RuntimeAgent.RemoteObject} promise | 478 * @param {?RuntimeAgent.RemoteObject} promise |
479 */ | 479 */ |
480 function didGetPromiseById(error, promise) | 480 function didGetPromiseById(error, promise) |
481 { | 481 { |
482 if (error || !promise) | 482 if (error || !promise) |
483 return; | 483 return; |
484 | 484 var object = target.runtimeModel.createRemoteObject(promise); |
485 target.consoleAgent().setLastEvaluationResult(promise.objectId); | 485 object.callFunction(dumpIntoConsole); |
486 var message = new WebInspector.ConsoleMessage(target, | 486 object.release(); |
487 WebInspector.ConsoleMe ssage.MessageSource.Other, | 487 /** |
488 WebInspector.ConsoleMe ssage.MessageLevel.Log, | 488 * @suppressReceiverCheck |
489 "", | 489 * @this {Object} |
490 WebInspector.ConsoleMe ssage.MessageType.Log, | 490 */ |
491 undefined, | 491 function dumpIntoConsole() |
492 undefined, | 492 { |
493 undefined, | 493 console.log(this); |
aandrey
2015/02/27 08:01:54
This should be tested, maybe? e.g. now there will
pfeldman
2015/02/27 08:05:34
No, console.log does not dump any stacks.
| |
494 undefined, | 494 } |
495 [promise]); | |
496 target.consoleModel.addMessage(message); | |
497 WebInspector.console.show(); | 495 WebInspector.console.show(); |
498 } | 496 } |
499 }, | 497 }, |
500 | 498 |
501 /** | 499 /** |
502 * @param {!Element} element | 500 * @param {!Element} element |
503 * @param {!Event} event | 501 * @param {!Event} event |
504 * @return {!Element|!AnchorBox|undefined} | 502 * @return {!Element|!AnchorBox|undefined} |
505 */ | 503 */ |
506 _getPopoverAnchor: function(element, event) | 504 _getPopoverAnchor: function(element, event) |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
660 } | 658 } |
661 }, | 659 }, |
662 | 660 |
663 reset: function() | 661 reset: function() |
664 { | 662 { |
665 this._hideCollectedPromisesSetting.set(false); | 663 this._hideCollectedPromisesSetting.set(false); |
666 this._promiseStatusFiltersSetting.set({}); | 664 this._promiseStatusFiltersSetting.set({}); |
667 this._textFilterUI.setValue(""); | 665 this._textFilterUI.setValue(""); |
668 } | 666 } |
669 } | 667 } |
OLD | NEW |