Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating ...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 01:58:38 +0000 (01:58 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Aug 2019 01:58:38 +0000 (01:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200798

Reviewed by Joseph Pecoraro.

* UserInterface/Views/ResourceDetailsSidebarPanel.js:
(WI.ResourceDetailsSidebarPanel.prototype.set resource):
(WI.ResourceDetailsSidebarPanel.prototype.layout):
Cancel the `Throttler` whenever the `_resource` is updated, as otherwise the `Throttler` may
fire later on with an unset `_resource`.

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

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/ResourceDetailsSidebarPanel.js

index 0f856b0..62c7860 100644 (file)
@@ -1,5 +1,18 @@
 2019-08-15  Devin Rousso  <drousso@apple.com>
 
+        Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'this._resource.initiatorSourceCodeLocation')
+        https://bugs.webkit.org/show_bug.cgi?id=200798
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/ResourceDetailsSidebarPanel.js:
+        (WI.ResourceDetailsSidebarPanel.prototype.set resource):
+        (WI.ResourceDetailsSidebarPanel.prototype.layout):
+        Cancel the `Throttler` whenever the `_resource` is updated, as otherwise the `Throttler` may
+        fire later on with an unset `_resource`.
+
+2019-08-15  Devin Rousso  <drousso@apple.com>
+
         Web Inspector: Sources: provide a way to create an arbitrary Inspector Style Sheet
         https://bugs.webkit.org/show_bug.cgi?id=200425
 
index 759e5d6..e71592a 100644 (file)
@@ -83,6 +83,7 @@ WI.ResourceDetailsSidebarPanel = class ResourceDetailsSidebarPanel extends WI.De
 
         if (this._resource && this._needsToRemoveResourceEventListeners) {
             this._resource.removeEventListener(null, null, this);
+            this._refreshRelatedResourcesSectionThrottler.cancel();
 
             this._needsToRemoveResourceEventListeners = false;
         }
@@ -211,7 +212,7 @@ WI.ResourceDetailsSidebarPanel = class ResourceDetailsSidebarPanel extends WI.De
         this._refreshRequestHeaders();
         this._refreshImageSizeSection();
         this._refreshRequestDataSection();
-        this._refreshRelatedResourcesSection();
+        this._refreshRelatedResourcesSectionThrottler.force();
     }
 
     sizeDidChange()