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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 2236033002: [DevTools] Simplify evaluation callbacks on frontend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-was-thrown
Patch Set: addressed comments Created 4 years, 4 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
OLDNEW
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 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
576 * @param {?string=} text 576 * @param {?string=} text
577 * @this {WebInspector.JavaScriptSourceFrame} 577 * @this {WebInspector.JavaScriptSourceFrame}
578 */ 578 */
579 function onResolve(text) 579 function onResolve(text)
580 { 580 {
581 selectedCallFrame.evaluate(text || evaluationText, objectGroupName, false, true, false, false, showObjectPopover.bind(this)); 581 selectedCallFrame.evaluate(text || evaluationText, objectGroupName, false, true, false, false, showObjectPopover.bind(this));
582 } 582 }
583 583
584 /** 584 /**
585 * @param {?RuntimeAgent.RemoteObject} result 585 * @param {?RuntimeAgent.RemoteObject} result
586 * @param {boolean=} wasThrown 586 * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
587 * @this {WebInspector.JavaScriptSourceFrame} 587 * @this {WebInspector.JavaScriptSourceFrame}
588 */ 588 */
589 function showObjectPopover(result, wasThrown) 589 function showObjectPopover(result, exceptionDetails)
590 { 590 {
591 var target = WebInspector.context.flavor(WebInspector.Target); 591 var target = WebInspector.context.flavor(WebInspector.Target);
592 if (selectedCallFrame.target() !== target || !debuggerModel.isPaused () || !result) { 592 if (selectedCallFrame.target() !== target || !debuggerModel.isPaused () || !result) {
593 this._popoverHelper.hidePopover(); 593 this._popoverHelper.hidePopover();
594 return; 594 return;
595 } 595 }
596 this._popoverAnchorBox = anchorBox; 596 this._popoverAnchorBox = anchorBox;
597 showCallback(target.runtimeModel.createRemoteObject(result), wasThro wn, this._popoverAnchorBox); 597 showCallback(target.runtimeModel.createRemoteObject(result), !!excep tionDetails, this._popoverAnchorBox);
598 // Popover may have been removed by showCallback(). 598 // Popover may have been removed by showCallback().
599 if (this._popoverAnchorBox) { 599 if (this._popoverAnchorBox) {
600 var highlightRange = new WebInspector.TextRange(lineNumber, star tHighlight, lineNumber, endHighlight); 600 var highlightRange = new WebInspector.TextRange(lineNumber, star tHighlight, lineNumber, endHighlight);
601 this._popoverAnchorBox._highlightDescriptor = this.textEditor.hi ghlightRange(highlightRange, "source-frame-eval-expression"); 601 this._popoverAnchorBox._highlightDescriptor = this.textEditor.hi ghlightRange(highlightRange, "source-frame-eval-expression");
602 } 602 }
603 } 603 }
604 }, 604 },
605 605
606 _onHidePopover: function() 606 _onHidePopover: function()
607 { 607 {
(...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this); 1130 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyChanged, this._workingCopyChanged, this);
1131 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this); 1131 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .WorkingCopyCommitted, this._workingCopyCommitted, this);
1132 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this); 1132 this.uiSourceCode().removeEventListener(WebInspector.UISourceCode.Events .TitleChanged, this._showBlackboxInfobarIfNeeded, this);
1133 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this); 1133 WebInspector.moduleSetting("skipStackFramesPattern").removeChangeListene r(this._showBlackboxInfobarIfNeeded, this);
1134 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this); 1134 WebInspector.moduleSetting("skipContentScripts").removeChangeListener(th is._showBlackboxInfobarIfNeeded, this);
1135 WebInspector.UISourceCodeFrame.prototype.dispose.call(this); 1135 WebInspector.UISourceCodeFrame.prototype.dispose.call(this);
1136 }, 1136 },
1137 1137
1138 __proto__: WebInspector.UISourceCodeFrame.prototype 1138 __proto__: WebInspector.UISourceCodeFrame.prototype
1139 } 1139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698