Title: [183119] trunk/Source/WebInspectorUI
Revision
183119
Author
[email protected]
Date
2015-04-22 12:00:50 -0700 (Wed, 22 Apr 2015)

Log Message

Web Inspector: Fix an exception preventing switching timelines
https://bugs.webkit.org/show_bug.cgi?id=144053

Reviewed by Darin Adler.

* UserInterface/Views/TreeOutline.js:
(WebInspector.TreeElement.prototype.select): Store treeOutline in a local so
we have a reference to it when we go to reset processingSelectionChange.
The calls to onselect was removing the tree element from the outline, causing
"delete this.treeOutline.processingSelectionChange" to throw an exception.
This patch changes the delete to a set to false for good measure too.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (183118 => 183119)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-04-22 19:00:20 UTC (rev 183118)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-04-22 19:00:50 UTC (rev 183119)
@@ -1,3 +1,17 @@
+2015-04-22  Timothy Hatcher  <[email protected]>
+
+        Web Inspector: Fix an exception preventing switching timelines
+        https://bugs.webkit.org/show_bug.cgi?id=144053
+
+        Reviewed by Darin Adler.
+
+        * UserInterface/Views/TreeOutline.js:
+        (WebInspector.TreeElement.prototype.select): Store treeOutline in a local so
+        we have a reference to it when we go to reset processingSelectionChange.
+        The calls to onselect was removing the tree element from the outline, causing
+        "delete this.treeOutline.processingSelectionChange" to throw an exception.
+        This patch changes the delete to a set to false for good measure too.
+
 2015-04-21  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Use String.prototype.startsWith in more places

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js (183118 => 183119)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2015-04-22 19:00:20 UTC (rev 183118)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js	2015-04-22 19:00:50 UTC (rev 183119)
@@ -974,17 +974,18 @@
             this.treeOutline._childrenListNode.focus();
 
         // Focusing on another node may detach "this" from tree.
-        if (!this.treeOutline)
+        var treeOutline = this.treeOutline;
+        if (!treeOutline)
             return;
 
-        this.treeOutline.processingSelectionChange = true;
+        treeOutline.processingSelectionChange = true;
 
         if (!this.selected) {
-            if (this.treeOutline.selectedTreeElement)
-                this.treeOutline.selectedTreeElement.deselect(suppressOnDeselect);
+            if (treeOutline.selectedTreeElement)
+                treeOutline.selectedTreeElement.deselect(suppressOnDeselect);
 
             this.selected = true;
-            this.treeOutline.selectedTreeElement = this;
+            treeOutline.selectedTreeElement = this;
 
             if (this._listItemNode)
                 this._listItemNode.classList.add("selected");
@@ -993,10 +994,10 @@
         if (this.onselect && !suppressOnSelect)
             this.onselect(this, selectedByUser);
 
-        if (this.treeOutline.onselect && !suppressOnSelect)
-            this.treeOutline.onselect(this, selectedByUser);
+        if (treeOutline.onselect && !suppressOnSelect)
+            treeOutline.onselect(this, selectedByUser);
 
-        delete this.treeOutline.processingSelectionChange;
+        treeOutline.processingSelectionChange = false;
     }
 
     revealAndSelect(omitFocus, selectedByUser, suppressOnSelect, suppressOnDeselect)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to