Bug 180506 - ServiceWorker Inspector: Should be able to see image content from CacheStorage.add(url) network request
Summary: ServiceWorker Inspector: Should be able to see image content from CacheStorag...
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:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-12-06 14:09 PST by Joseph Pecoraro
Modified: 2017-12-08 14:59 PST (History)
5 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (7.70 KB, patch)
2017-12-06 14:11 PST, Joseph Pecoraro
bburg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2017-12-06 14:09:11 PST
Should be able to see image content from CacheStorage.add(url) network request

Steps to Reproduce:
1. Inspect ServiceWorker on <https://mdn.github.io/sw-test/>
2. Show Network Tab
3. js> caches.open("v1").then((cache) => { cache.add("/sw-test/star-wars-logo.jpg") });
4. Select Network Table entry for star-wars-logo to show resource preview
  => Error message screen instead of image

Notes:
- Network.getResponseBody has no data
  - There is no CachedResource on the Worker
  - The data wasn't buffered in NetworkResourceData

Lets make the data buffer in NetworkResourceData for workers so we are guaranteed data.
Comment 1 Joseph Pecoraro 2017-12-06 14:11:32 PST
Created attachment 328626 [details]
[PATCH] Proposed Fix
Comment 2 BJ Burg 2017-12-08 14:40:57 PST
Comment on attachment 328626 [details]
[PATCH] Proposed Fix

r=me
Comment 3 Joseph Pecoraro 2017-12-08 14:58:06 PST
<https://trac.webkit.org/r225708>
Comment 4 Radar WebKit Bug Importer 2017-12-08 14:59:18 PST
<rdar://problem/35944628>