Summary: | Web Inspector: bind resources to URLs upon adding them into the tree. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Pavel Feldman <pfeldman> | ||||||
Component: | Web Inspector (Deprecated) | Assignee: | Pavel Feldman <pfeldman> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Pavel Feldman
2011-01-24 08:16:44 PST
Created attachment 80045 [details]
[PATCH] Proposed change
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. (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. Created attachment 80049 [details]
Patch
Committed r76587: <http://trac.webkit.org/changeset/76587> |