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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
index 75d087994619d9829f2aace70eec5b6111d15c67..1325380cd9d083def102a7e72994ff9fa2695271 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js
@@ -233,7 +233,7 @@ WebInspector.WatchExpression = function(expression, expandController, linkifier)
this._editing = false;
this._linkifier = linkifier;
- this._createWatchExpression(null, false);
+ this._createWatchExpression(null);
this.update();
}
@@ -341,9 +341,9 @@ WebInspector.WatchExpression.prototype = {
/**
* @param {?WebInspector.RemoteObject} result
- * @param {boolean} wasThrown
+ * @param {!RuntimeAgent.ExceptionDetails=} exceptionDetails
*/
- _createWatchExpression: function(result, wasThrown)
+ _createWatchExpression: function(result, exceptionDetails)
{
this._result = result;
@@ -354,12 +354,12 @@ WebInspector.WatchExpression.prototype = {
var titleElement = headerElement.createChild("div", "watch-expression-title");
this._nameElement = WebInspector.ObjectPropertiesSection.createNameElement(this._expression);
- if (wasThrown || !result) {
+ if (!!exceptionDetails || !result) {
this._valueElement = createElementWithClass("span", "error-message value");
titleElement.classList.add("dimmed");
this._valueElement.textContent = WebInspector.UIString("<not available>");
} else {
- this._valueElement = WebInspector.ObjectPropertiesSection.createValueElementWithCustomSupport(result, wasThrown, titleElement, this._linkifier);
+ this._valueElement = WebInspector.ObjectPropertiesSection.createValueElementWithCustomSupport(result, !!exceptionDetails, titleElement, this._linkifier);
}
var separatorElement = createElementWithClass("span", "watch-expressions-separator");
separatorElement.textContent = ": ";
@@ -367,7 +367,7 @@ WebInspector.WatchExpression.prototype = {
this._element.removeChildren();
this._objectPropertiesSection = null;
- if (!wasThrown && result && result.hasChildren && !result.customPreview()) {
+ if (!exceptionDetails && result && result.hasChildren && !result.customPreview()) {
headerElement.classList.add("watch-expression-object-header");
this._objectPropertiesSection = new WebInspector.ObjectPropertiesSection(result, headerElement, this._linkifier);
this._objectPresentationElement = this._objectPropertiesSection.element;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698