WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 92108
Web Inspector: Resource agent's reference to cached resources should be weak.
https://bugs.webkit.org/show_bug.cgi?id=92108
Summary
Web Inspector: Resource agent's reference to cached resources should be weak.
Vsevolod Vlasov
Reported
2012-07-24 06:02:22 PDT
Patch to follow
Attachments
Patch
(52.76 KB, patch)
2012-07-24 07:07 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch
(26.36 KB, patch)
2012-07-25 07:37 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch
(40.17 KB, patch)
2012-07-26 02:34 PDT
,
Vsevolod Vlasov
gustavo
: commit-queue-
Details
Formatted Diff
Diff
Patch
(42.78 KB, patch)
2012-07-27 01:20 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Patch
(45.21 KB, patch)
2012-07-29 13:02 PDT
,
Vsevolod Vlasov
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Vsevolod Vlasov
Comment 1
2012-07-24 07:07:04 PDT
Created
attachment 154051
[details]
Patch
Pavel Feldman
Comment 2
2012-07-25 02:33:15 PDT
Comment on
attachment 154051
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154051&action=review
This change looks like a hack both from the API and implementation standpoint. Is there a way to implement it in a more elegant manner?
> Source/WebCore/inspector/Inspector.json:871 > + { "name": "resourceId", "$ref": "Page.ResourceId", "description": "Identifier of the relevant resource." },
I don't think we should introduce resourceId concept. Why is requestId not sufficient in the API?
> Source/WebCore/inspector/InspectorController.cpp:186 > + InspectorInstrumentation::inspectedPageDestroyed(m_instrumentingAgents.get());
This is very strange - InspectorController has pointers to agents explicitly as well as to m_instrumentingAgents. Why does it use InspectorInstrumentation ?
> Source/WebCore/inspector/InspectorInstrumentation.cpp:854 > + if (!cachedResourceToAgentsMap || !cachedResourceToAgentsMap->contains(cachedResource))
InspectorInstrumentation is just a dispatch, it should not have logic like this.
> Source/WebCore/inspector/InspectorInstrumentation.cpp:1167 > +void InspectorInstrumentation::inspectedPageDestroyed(InstrumentingAgents* instrumentingAgents)
ditto
> Source/WebCore/inspector/InspectorPageAgent.cpp:960 > + InspectorInstrumentation::addInstrumentingAgentsForCachedResource(cachedResource, m_instrumentingAgents);
This looks like a hack.
Vsevolod Vlasov
Comment 3
2012-07-25 07:37:51 PDT
Created
attachment 154351
[details]
Patch
Yury Semikhatsky
Comment 4
2012-07-25 08:14:47 PDT
Comment on
attachment 154351
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154351&action=review
> Source/WebCore/inspector/InspectorInstrumentation.cpp:1160 > +void InspectorInstrumentation::registerInstrumentingAgents(InstrumentingAgents* instrumentingAgents)
Why not iterate through all pages (see allPages in Page.cpp) and get InstrumentingAgents from Page instead of introducing a HashSet of all InstrumentingAgents instances?
Yury Semikhatsky
Comment 5
2012-07-25 08:20:09 PDT
Comment on
attachment 154351
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154351&action=review
> Source/WebCore/inspector/InspectorInstrumentation.h:98 > + friend class InspectorController;
I'd rather make (un)registerInstrumentingAgents methods public instead of adding friend class.
Pavel Feldman
Comment 6
2012-07-25 08:24:41 PDT
Comment on
attachment 154351
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154351&action=review
How do we test this?
> Source/WebCore/loader/cache/CachedResource.cpp:434 > + if (!deleteIfPossible() && !hasClients() && inCache()) {
bool deleted = ...
> Source/WebCore/loader/cache/CachedResourceLoader.cpp:816 > + if (!res->deleteIfPossible() && res->preloadResult() == CachedResource::PreloadNotReferenced)
ditto
Vsevolod Vlasov
Comment 7
2012-07-26 01:48:26 PDT
Committed
r123715
: <
http://trac.webkit.org/changeset/123715
>
WebKit Review Bot
Comment 8
2012-07-26 02:23:01 PDT
Re-opened since this is blocked by 92356
Vsevolod Vlasov
Comment 9
2012-07-26 02:34:42 PDT
Created
attachment 154590
[details]
Patch
Gustavo Noronha (kov)
Comment 10
2012-07-26 06:35:17 PDT
Comment on
attachment 154590
[details]
Patch
Attachment 154590
[details]
did not pass gtk-ews (gtk): Output:
http://queues.webkit.org/results/13351684
Build Bot
Comment 11
2012-07-26 14:04:44 PDT
Comment on
attachment 154590
[details]
Patch
Attachment 154590
[details]
did not pass mac-ews (mac): Output:
http://queues.webkit.org/results/13349985
Vsevolod Vlasov
Comment 12
2012-07-27 01:20:31 PDT
Created
attachment 154874
[details]
Patch
WebKit Review Bot
Comment 13
2012-07-27 07:32:09 PDT
Comment on
attachment 154351
[details]
Patch Cleared Pavel Feldman's review+ from obsolete
attachment 154351
[details]
so that this bug does not appear in
http://webkit.org/pending-commit
.
Timothy Hatcher
Comment 14
2012-07-27 08:26:50 PDT
Comment on
attachment 154874
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=154874&action=review
> Source/WebCore/inspector/NetworkResourcesData.h:97 > + size_t dataLength() const; > + void appendData(const char* data, size_t dataLength); > + size_t decodeDataToContent();
All these int => size_t chanegs should be done in a seperate change. It has nothing to do with making the resources weak, it is just noise here.
Build Bot
Comment 15
2012-07-27 14:52:51 PDT
Comment on
attachment 154874
[details]
Patch
Attachment 154874
[details]
did not pass win-ews (win): Output:
http://queues.webkit.org/results/13372702
Vsevolod Vlasov
Comment 16
2012-07-29 13:02:36 PDT
Created
attachment 155178
[details]
Patch
Vsevolod Vlasov
Comment 17
2012-07-30 00:55:16 PDT
Committed
r124000
: <
http://trac.webkit.org/changeset/124000
>
Chris Dumez
Comment 18
2012-07-30 04:20:04 PDT
This patch appears to cause crashes at least on EFL port. I opened
Bug 92628
to address it.
Chris Dumez
Comment 19
2012-07-30 04:21:28 PDT
Comment on
attachment 155178
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=155178&action=review
> Source/WebCore/inspector/InspectorInstrumentation.cpp:1173 > + delete instrumentingAgentsSet;
I believe we should reset instrumentingAgentsSet to 0 after calling delete.
WebKit Review Bot
Comment 20
2012-07-30 04:42:06 PDT
Re-opened since this is blocked by 92632
Vsevolod Vlasov
Comment 21
2012-07-30 08:59:10 PDT
Committed
r124032
: <
http://trac.webkit.org/changeset/124032
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug