Fixes a bug where the Inspector could have 0ms timers firing
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 10:12:33 +0000 (10:12 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 May 2008 10:12:33 +0000 (10:12 +0000)
even after it is closed.

https://bugs.webkit.org/show_bug.cgi?id=18577

Reviewed by Oliver Hunt.

* page/inspector/DatabasesPanel.js: Removes setTimeouts that call
the same function with a 0ms delay. These we not doing any good anyway,
so they weren't needed and just caused problems.
* page/inspector/ElementsPanel.js: Ditto.
* page/inspector/ProfilesPanel.js: Ditto.
* page/inspector/ResourcesPanel.js: Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/page/inspector/DatabasesPanel.js
WebCore/page/inspector/ElementsPanel.js
WebCore/page/inspector/ProfilesPanel.js
WebCore/page/inspector/ResourcesPanel.js

index a8a728c..18f8270 100644 (file)
@@ -1,5 +1,21 @@
 2008-05-23  Timothy Hatcher  <timothy@apple.com>
 
+        Fixes a bug where the Inspector could have 0ms timers firing
+        even after it is closed.
+
+        https://bugs.webkit.org/show_bug.cgi?id=18577
+
+        Reviewed by Oliver Hunt.
+
+        * page/inspector/DatabasesPanel.js: Removes setTimeouts that call
+        the same function with a 0ms delay. These we not doing any good anyway,
+        so they weren't needed and just caused problems.
+        * page/inspector/ElementsPanel.js: Ditto.
+        * page/inspector/ProfilesPanel.js: Ditto.
+        * page/inspector/ResourcesPanel.js: Ditto.
+
+2008-05-23  Timothy Hatcher  <timothy@apple.com>
+
         Make the Inspector correctly populate the profiles when
         closed and re-opened.
 
index 74c9e80..f24a55b 100644 (file)
@@ -258,8 +258,8 @@ WebInspector.DatabasesPanel.prototype = {
     _updateSidebarWidth: function(width)
     {
         if (this.sidebarElement.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this._updateSidebarWidth.bind(this), 0, width);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
index 9400c38..7e8b3bc 100644 (file)
@@ -547,8 +547,8 @@ WebInspector.ElementsPanel.prototype = {
             return;
 
         if (document.body.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this.updateBreadcrumbSizes.bind(this), 0);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
@@ -996,8 +996,8 @@ WebInspector.DOMNodeTreeElement.prototype = {
             return;
 
         if (document.body.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this.updateSelection.bind(this), 0);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
index 453b31d..cea9816 100644 (file)
@@ -211,8 +211,8 @@ WebInspector.ProfilesPanel.prototype = {
     _updateSidebarWidth: function(width)
     {
         if (this.sidebarElement.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this._updateSidebarWidth.bind(this), 0, width);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
index 114e3db..0dd9a38 100644 (file)
@@ -592,8 +592,8 @@ WebInspector.ResourcesPanel.prototype = {
         }
 
         if (document.body.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this._updateGraphDividersIfNeeded.bind(this), 0);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
@@ -642,8 +642,8 @@ WebInspector.ResourcesPanel.prototype = {
         }
 
         if (document.body.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this._updateGraphBars.bind(this), 0);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }
 
@@ -1053,8 +1053,8 @@ WebInspector.ResourcesPanel.prototype = {
     _updateSidebarWidth: function(width)
     {
         if (this.sidebarElement.offsetWidth <= 0) {
-            // The stylesheet hasn't loaded yet, so we need to update later.
-            setTimeout(this._updateSidebarWidth.bind(this), 0, width);
+            // The stylesheet hasn't loaded yet or the window is closed,
+            // so we can't calculate what is need. Return early.
             return;
         }