WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
53013
Web Inspector: bind resources to URLs upon adding them into the tree.
https://bugs.webkit.org/show_bug.cgi?id=53013
Summary
Web Inspector: bind resources to URLs upon adding them into the tree.
Pavel Feldman
Reported
2011-01-24 08:16:44 PST
I am slowly splitting the 'network request' vs 'resource item' aspects in the Resource.js. From now on, resource is only bound with URL upon addition into the resource tree.
Attachments
[PATCH] Proposed change
(15.40 KB, patch)
2011-01-25 04:06 PST
,
Pavel Feldman
no flags
Details
Formatted Diff
Diff
Patch
(17.05 KB, patch)
2011-01-25 04:42 PST
,
Pavel Feldman
yurys
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Pavel Feldman
Comment 1
2011-01-25 04:06:11 PST
Created
attachment 80045
[details]
[PATCH] Proposed change
Andrey Kosyakov
Comment 2
2011-01-25 04:33:37 PST
Comment on
attachment 80045
[details]
[PATCH] Proposed change View in context:
https://bugs.webkit.org/attachment.cgi?id=80045&action=review
> Source/WebCore/inspector/front-end/NetworkManager.js:-305 > - this._resourceTreeModel.unbindResourceURL(originalResource);
Shouldn't we clean up _inflightResourceByURL entry for the original URL here? There doesn't seem to be another chance.
> Source/WebCore/inspector/front-end/NetworkManager.js:330 > + delete this._inflightResourcesByURL[resource.identifier];
you need to use resource.url, not identifier here.
> Source/WebCore/inspector/front-end/ScriptsPanel.js:276 > + var resource = WebInspector.networkManager.inflightResourceForURL(script.sourceURL) || WebInspector.resourceForURL(script.sourceURL);
So, is this guaranteed to be called before resource is finished? Otherwise, there wouldn't be in inflight resources.
Pavel Feldman
Comment 3
2011-01-25 04:40:37 PST
(In reply to
comment #2
)
> (From update of
attachment 80045
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=80045&action=review
> > > Source/WebCore/inspector/front-end/NetworkManager.js:-305 > > - this._resourceTreeModel.unbindResourceURL(originalResource); > > Shouldn't we clean up _inflightResourceByURL entry for the original URL here? There doesn't seem to be another chance. >
Now that bind is encapsulated in ResourceTreeModel, we only perform it upon resource addition to the tree. Which happens upon didReceiveResponse, i.e. does not happen for intermediate redirects.
> > Source/WebCore/inspector/front-end/NetworkManager.js:330 > > + delete this._inflightResourcesByURL[resource.identifier]; > > you need to use resource.url, not identifier here.
> Thanks, fixed.
> > Source/WebCore/inspector/front-end/ScriptsPanel.js:276 > > + var resource = WebInspector.networkManager.inflightResourceForURL(script.sourceURL) || WebInspector.resourceForURL(script.sourceURL); > > So, is this guaranteed to be called before resource is finished? Otherwise, there wouldn't be in inflight resources.
Yes, it is.
Pavel Feldman
Comment 4
2011-01-25 04:42:52 PST
Created
attachment 80049
[details]
Patch
Pavel Feldman
Comment 5
2011-01-25 05:32:57 PST
Committed
r76587
: <
http://trac.webkit.org/changeset/76587
>
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