Bug 148727 - Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector
Summary: Add a new ResourceLoaderOption to avoid page defers loading mechanisms for in...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: DoNotImportToRadar
Depends on:
Blocks:
 
Reported: 2015-09-02 15:57 PDT by Joseph Pecoraro
Modified: 2015-09-05 01:47 PDT (History)
11 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (16.63 KB, patch)
2015-09-02 15:59 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] Proposed Fix (18.27 KB, patch)
2015-09-02 18:11 PDT, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2015-09-02 15:57:32 PDT
* SUMMARY
Add a new ResourceLoaderOption to avoid page defers loading mechanisms for inspector.

Web Inspector has the capability to load arbitrary URLs through the inspected page (Network.loadResource). This capability is used for loading SourceMap resources through the inspected page. We also want to use this in tests, to load test resources through the inspected page.

In WebCore, defers loading is a Page attribute. When the Page's defersLoading state changes it cascades to all ResourceHandles tied to that page (cascading through FrameResourceLoader, DocumentLoader, SubresourceLoader, ResourceLoader, ResourceHandle). However, this Web Inspector resource load doesn't want to respect the Page's defersLoading status. For instance, if the page is Paused it will be deferring network loads, but we still want this inspector resource load to finish.

InspectorResourceAgent right now, always attempts to disable the defers loading state of the loader. This will ASSERT in ResourceHandle if the value didn't change, which is a useful ASSERT to detect accidental imbalances. As such, no manipulation of this flag apart from matching the Page would be perfect.

A better approach, would be to disallow defers loading entirely for this loader. We can add a ResourceLoaderOption to this extent, and just never allow it to be deferred.
Comment 1 Joseph Pecoraro 2015-09-02 15:59:59 PDT
Created attachment 260448 [details]
[PATCH] Proposed Fix
Comment 2 Joseph Pecoraro 2015-09-02 18:11:40 PDT
Created attachment 260466 [details]
[PATCH] Proposed Fix
Comment 3 WebKit Commit Bot 2015-09-05 01:47:30 PDT
Comment on attachment 260466 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 260466

Committed r189432: <http://trac.webkit.org/changeset/189432>
Comment 4 WebKit Commit Bot 2015-09-05 01:47:35 PDT
All reviewed patches have been landed.  Closing bug.