Bug 200680

Summary: Uncaught Exception: content.isJSON is not a function selecting image resource
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, joepeck, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: http://bogojoker.com/shell/
Attachments:
Description Flags
[PATCH] Proposed Fix
hi: review+
[PATCH] For Landing none

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>