Bug 64356 - Web Inspector: InspectorResourceAgent should generate unique identifier and save cachedResource for resources from memory cache.
Summary: Web Inspector: InspectorResourceAgent should generate unique identifier and s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Vsevolod Vlasov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-12 06:49 PDT by Vsevolod Vlasov
Modified: 2011-07-14 09:59 PDT (History)
11 users (show)

See Also:


Attachments
Patch (13.40 KB, patch)
2011-07-13 12:52 PDT, Vsevolod Vlasov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.