Title: [248637] trunk/Source/WebInspectorUI
Revision
248637
Author
pecor...@apple.com
Date
2019-08-13 15:14:49 -0700 (Tue, 13 Aug 2019)

Log Message

Uncaught Exception: content.isJSON is not a function selecting image resource
https://bugs.webkit.org/show_bug.cgi?id=200680

Reviewed by Devin Rousso.

* UserInterface/Views/ResourceClusterContentView.js:
(WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
Protect against non-string data, such as Blob response content.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (248636 => 248637)


--- trunk/Source/WebInspectorUI/ChangeLog	2019-08-13 22:13:36 UTC (rev 248636)
+++ trunk/Source/WebInspectorUI/ChangeLog	2019-08-13 22:14:49 UTC (rev 248637)
@@ -1,3 +1,14 @@
+2019-08-13  Joseph Pecoraro  <pecor...@apple.com>
+
+        Uncaught Exception: content.isJSON is not a function selecting image resource
+        https://bugs.webkit.org/show_bug.cgi?id=200680
+
+        Reviewed by Devin Rousso.
+
+        * UserInterface/Views/ResourceClusterContentView.js:
+        (WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
+        Protect against non-string data, such as Blob response content.
+
 2019-08-13  Devin Rousso  <drou...@apple.com>
 
         Web Inspector: Styles: show @supports CSS groupings

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js (248636 => 248637)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js	2019-08-13 22:13:36 UTC (rev 248636)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js	2019-08-13 22:14:49 UTC (rev 248637)
@@ -342,7 +342,7 @@
 
     _canUseJSONContentViewForContent(content)
     {
-        return content.isJSON((json) => json && (typeof json === "object" || Array.isArray(json)));
+        return typeof content === "string" && content.isJSON((json) => json && (typeof json === "object" || Array.isArray(json)));
     }
 
     _tryEnableCustomRequestContentView()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to