Bug 64356

Summary: Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
Product: WebKit Reporter: Vsevolod Vlasov <vsevik>
Component: Web Inspector (Deprecated)Assignee: Vsevolod Vlasov <vsevik>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch none

Description Vsevolod Vlasov 2011-07-12 06:49:32 PDT
InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
Comment 1 Vsevolod Vlasov 2011-07-13 12:52:41 PDT
Created attachment 100703 [details]
Patch
Comment 2 Pavel Feldman 2011-07-13 23:26:54 PDT
Comment on attachment 100703 [details]
Patch

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

> Source/WebCore/inspector/front-end/NetworkPanel.js:760
> +                    originalResource.networkDataRemoved = true;

I don't like the fact that resource is marked as "data removed" independently on the front-end. It should be either explicit "data collected" event or we should simply return error upon backend requests in such cases. We are missing unique identifiers across processes to implement this though.
Comment 3 Yury Semikhatsky 2011-07-13 23:51:26 PDT
Comment on attachment 100703 [details]
Patch

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

> Source/WebCore/inspector/InspectorInstrumentation.h:-121
> -    static void didLoadResourceFromMemoryCache(Page*, DocumentLoader*, const CachedResource*);

Can we make ResourceData keep const CachedResource* instead? Inspector code shouldn't modify cached resources.
Comment 4 Yury Semikhatsky 2011-07-14 00:25:17 PDT
Comment on attachment 100703 [details]
Patch

Ok, I see now that the problem is in CachedResource::makePurgable call which we should be able to avoid in inspector code but it deserve its own change.
Comment 5 WebKit Review Bot 2011-07-14 09:59:25 PDT
Comment on attachment 100703 [details]
Patch

Clearing flags on attachment: 100703

Committed r91006: <http://trac.webkit.org/changeset/91006>
Comment 6 WebKit Review Bot 2011-07-14 09:59:30 PDT
All reviewed patches have been landed.  Closing bug.