Index: Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
diff --git a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
index 1180e98e48442091053aaa7e9ada5a931687d40c..bad9bebec7bcd2739767c56f6d2c6a29d469cbdd 100644 |
--- a/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
+++ b/Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js |
@@ -36,7 +36,10 @@ WebInspector.WatchExpressionsSidebarPane = function() |
{ |
WebInspector.SidebarPane.call(this, WebInspector.UIString("Watch Expressions")); |
- this.section = new WebInspector.WatchExpressionsSection(); |
+ /** @type {!WebInspector.ObjectPropertiesMemento} */ |
+ this.memento = new WebInspector.ObjectPropertiesMemento(); |
+ |
+ this.section = new WebInspector.WatchExpressionsSection(this.memento); |
this.bodyElement.appendChild(this.section.element); |
var refreshButton = this.titleElement.createChild("button", "pane-title-button refresh"); |
@@ -100,12 +103,16 @@ WebInspector.WatchExpressionsSidebarPane.prototype = { |
/** |
* @constructor |
* @extends {WebInspector.PropertiesSection} |
+ * @param {!WebInspector.ObjectPropertiesMemento} memento |
*/ |
-WebInspector.WatchExpressionsSection = function() |
+WebInspector.WatchExpressionsSection = function(memento) |
{ |
this._watchObjectGroupId = "watch-group"; |
WebInspector.PropertiesSection.call(this, ""); |
+ |
+ this.memento = memento; |
+ |
this.treeElementConstructor = WebInspector.ObjectPropertyTreeElement; |
this.skipProto = false; |
@@ -222,6 +229,8 @@ WebInspector.WatchExpressionsSection.prototype = { |
*/ |
updateProperties: function(properties) |
{ |
+ this.memento.forgetProperties(); |
+ |
this.propertiesTreeOutline.removeChildren(); |
WebInspector.ObjectPropertyTreeElement.populateWithProperties(this.propertiesTreeOutline, properties, [], |
WebInspector.WatchExpressionTreeElement, WebInspector.WatchExpressionsSection.CompareProperties, false, null); |