Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating...
authordrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2019 22:21:02 +0000 (22:21 +0000)
committerdrousso@apple.com <drousso@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 18 Jan 2019 22:21:02 +0000 (22:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193589

Reviewed by Joseph Pecoraro.

* UserInterface/Views/NetworkTableContentView.js:
(WI.NetworkTableContentView.prototype.get supportsSave):
(WI.NetworkTableContentView.prototype._HARResources):

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

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

index b56793b..ca2131e 100644 (file)
@@ -1,3 +1,14 @@
+2019-01-18  Devin Rousso  <drousso@apple.com>
+
+        Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'resource.finished')
+        https://bugs.webkit.org/show_bug.cgi?id=193589
+
+        Reviewed by Joseph Pecoraro.
+
+        * UserInterface/Views/NetworkTableContentView.js:
+        (WI.NetworkTableContentView.prototype.get supportsSave):
+        (WI.NetworkTableContentView.prototype._HARResources):
+
 2019-01-17  Truitt Savell  <tsavell@apple.com>
 
         Unreviewed, rolling out r240124.
index 57ec8af..3c71828 100644 (file)
@@ -224,7 +224,7 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie
 
     get supportsSave()
     {
-        return this._filteredEntries.some((entry) => entry.resource.finished);
+        return this._canExportHAR();
     }
 
     get saveData()
@@ -1890,6 +1890,11 @@ WI.NetworkTableContentView = class NetworkTableContentView extends WI.ContentVie
         let resources = this._filteredEntries.map((x) => x.resource);
         const supportedHARSchemes = new Set(["http", "https", "ws", "wss"]);
         return resources.filter((resource) => {
+            if (!resource) {
+                // DOM node entries are also added to `_filteredEntries`.
+                return false;
+            }
+
             if (!resource.finished)
                 return false;
             if (!resource.requestSentDate)