Bug 200680 - Uncaught Exception: content.isJSON is not a function selecting image resource
Summary: Uncaught Exception: content.isJSON is not a function selecting image resource
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL: http://bogojoker.com/shell/
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-08-13 11:34 PDT by Joseph Pecoraro
Modified: 2019-08-13 21:59 PDT (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (1.56 KB, patch)
2019-08-13 11:36 PDT, Joseph Pecoraro
hi: review+
Details | Formatted Diff | Diff
[PATCH] For Landing (1.56 KB, patch)
2019-08-13 13:36 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2019-08-13 11:34:09 PDT
Uncaught Exception: content.isJSON is not a function selecting image resource

* STEPS TO REPRODUCE
1. Inspect http://bogojoker.com/shell/
2. Click the gif in the Sources tab
  => Exception
Comment 1 Joseph Pecoraro 2019-08-13 11:36:28 PDT
Created attachment 376186 [details]
[PATCH] Proposed Fix
Comment 2 Devin Rousso 2019-08-13 12:01:52 PDT
Comment on attachment 376186 [details]
[PATCH] Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=376186&action=review

r=me

Interesting.  What's the type of the content for image resources?  I'd imagine it's a string that's `base64Encoded`?

> Source/WebInspectorUI/ChangeLog:10
> +        Protect against null, such as there being no request data.

There should already be a guard for protecting against no request data (`_canShowRequestContentView`).  Was that the issue in this case, or was it just for `null`?
Comment 3 Joseph Pecoraro 2019-08-13 13:36:21 PDT
Created attachment 376208 [details]
[PATCH] For Landing
Comment 4 Joseph Pecoraro 2019-08-13 13:37:36 PDT
(In reply to Devin Rousso from comment #2)
> Comment on attachment 376186 [details]
> [PATCH] Proposed Fix
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=376186&action=review
> 
> Interesting.  What's the type of the content for image resources?  I'd
> imagine it's a string that's `base64Encoded`?

In this case it is a Blob. I've clarified the ChangeLog.
Comment 5 WebKit Commit Bot 2019-08-13 15:14:56 PDT
Comment on attachment 376208 [details]
[PATCH] For Landing

Clearing flags on attachment: 376208

Committed r248637: <https://trac.webkit.org/changeset/248637>
Comment 6 Radar WebKit Bug Importer 2019-08-13 21:59:17 PDT
<rdar://problem/54288272>