Currently, several components call WebInspector.networkResources() to retrieve network resources list from the Network panel. This is a layering violation and causes certain bugs (e.g. when network panel is set to preserve resources list during navigation, Audits panel will use resource list from several sessions). This patch introduces WebInspector.NetworkLog that maintains current list of network resources. Note that webInspector.resources.getHAR() extension call will not honor "Preserve log upon navigation" button of Network panel now. This is intentional. Also note that NetworkManager still indirectly uses NetworkPanel.resourceById(). This should be removed later (see bug 62476).
Created attachment 96785 [details] patch
Created attachment 96792 [details] patch Also removed NetworkPanel.resources
Comment on attachment 96792 [details] patch Attachment 96792 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/8829316 New failing tests: http/tests/inspector/network/network-open-load-reopen.html http/tests/inspector/network/network-clear-after-disabled.html http/tests/inspector/network/network-close-load-open.html
Created attachment 96795 [details] Archive of layout-test-results from ec2-cr-linux-03 The attached test failures were seen while running run-webkit-tests on the chromium-ews. Bot: ec2-cr-linux-03 Port: Chromium Platform: Linux-2.6.35-28-virtual-x86_64-with-Ubuntu-10.10-maverick
Comment on attachment 96792 [details] patch So this is no functional change?
Comment on attachment 96792 [details] patch As we agreed offline, this is not ready for review.
Created attachment 100269 [details] patch - use old logic for preserving resources during navigation (check loaderId) - preserve NetworkPanel.resources(), as it is used by layout tests
Comment on attachment 100269 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=100269&action=review > Source/WebCore/inspector/front-end/NetworkManager.js:330 > + return this._resources; I'd rather further encapsulate "resources" (via addResource) since you swap the instance in the frameNavigated.
Created attachment 100293 [details] patch - retain resources array object while clearing old resources list during navigation
Comment on attachment 100293 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=100293&action=review > Source/WebCore/inspector/front-end/NetworkManager.js:338 > + var oldResources = this._resources.splice(0, this._resources.length); this._resources.length = 0;
Comment on attachment 100293 [details] patch Clearing flags on attachment: 100293 Committed r90745: <http://trac.webkit.org/changeset/90745>
All reviewed patches have been landed. Closing bug.