Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: Source/devtools/front_end/promises/PromisePane.js

Issue 967493002: DevTools: remove setLastEvaluationResult from the protocol. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebaselined Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorConsoleAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorConsoleAgent.cpp ('k') | Source/devtools/protocol.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698