Bug 80543 - Assertion failure in ResourceHandle::setDefersLoading(): d->m_defersLoading != defers
Summary: Assertion failure in ResourceHandle::setDefersLoading(): d->m_defersLoading !...
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Pratik Solanki
Keywords: InRadar
Depends on:
Reported: 2012-03-07 14:36 PST by Pratik Solanki
Modified: 2012-03-09 16:46 PST (History)
6 users (show)

See Also:

Patch (1.72 KB, patch)
2012-03-07 15:03 PST, Pratik Solanki
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pratik Solanki 2012-03-07 14:36:08 PST
It's possible to hit the assertion in ResourceHandle::setDefersLoading() in the following sequence

- We create a ResourceLoader (subresource loader) with defersLoading = false
- But the ResourceLoader hasn't been added to the subresource list in DocumentLoader and instead is sitting the pending requests list in ResourceLoadScheduler.
- Page::setDefersLoading(true) gets called which changes the flag on all subresources except those sitting in the pending requests list.
- Later, the request in the pending request list get started which adds them into the subresource list in DocumentLoader
- A subsequent call to Page::setDefersLoading() triggers the assert.
Comment 1 Pratik Solanki 2012-03-07 14:36:27 PST
Comment 2 Pratik Solanki 2012-03-07 15:03:07 PST
Created attachment 130704 [details]
Comment 3 Geoffrey Garen 2012-03-08 16:54:54 PST
Comment on attachment 130704 [details]

Comment 4 Pratik Solanki 2012-03-09 16:45:35 PST
Committed r110349: <http://trac.webkit.org/changeset/110349>