Changeset 248637 in webkit


Ignore:
Timestamp:
Aug 13, 2019 3:14:49 PM (5 years ago)
Author:
Joseph Pecoraro
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.

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r248602 r248637  
     12019-08-13  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Uncaught Exception: content.isJSON is not a function selecting image resource
     4        https://bugs.webkit.org/show_bug.cgi?id=200680
     5
     6        Reviewed by Devin Rousso.
     7
     8        * UserInterface/Views/ResourceClusterContentView.js:
     9        (WI.ResourceClusterContentView.prototype._canUseJSONContentViewForContent):
     10        Protect against non-string data, such as Blob response content.
     11
    1122019-08-13  Devin Rousso  <drousso@apple.com>
    213
  • trunk/Source/WebInspectorUI/UserInterface/Views/ResourceClusterContentView.js

    r248485 r248637  
    343343    _canUseJSONContentViewForContent(content)
    344344    {
    345         return content.isJSON((json) => json && (typeof json === "object" || Array.isArray(json)));
     345        return typeof content === "string" && content.isJSON((json) => json && (typeof json === "object" || Array.isArray(json)));
    346346    }
    347347
Note: See TracChangeset for help on using the changeset viewer.