[webkit-reviews] review requested: [Bug 62808] [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes crash : [Attachment 97809] proposed fix

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 20 09:15:10 PDT 2011


yi shen <yi.4.shen at nokia.com> has asked  for review:
Bug 62808: [Qt] ASSERTION FAILED in ResourceHandle::setDefersLoading causes
crash
https://bugs.webkit.org/show_bug.cgi?id=62808

Attachment 97809: proposed fix
https://bugs.webkit.org/attachment.cgi?id=97809&action=review

------- Additional Comments from yi shen <yi.4.shen at nokia.com>
I saw there is one logical error for this assertion failure is that, for Qt's
implementation of ResourceHandle::platformSetDefersLoading &
NetworkReplyHandler::setLoadingDeferred, the deferred loading data get
forwarded to document loader too early.

When resume a page loading, webkit calls
DocumentLoader::setDefersLoading(false), which first calls setDefersLoading to
false on the main resource loader, then on all the sub resource loaders. For
Qt, once the main resource loader gets resumed, it forwards all the deferred
loading data to the document loader & parser, which leads to create some new
sub-resource loaders. Next, when document loader resumes the sub resource
loaders, it calls setDefersLoading(false) on these new created sub-resource
loaders, which is incorrect by assumption (that's why the assertion fails).

To fix this issue, one solution could be forwarding the deferred data after
DocumentLoader::setDefersLoading(false) finished. So, I added a timer (the
timeout is set to 0) in my patch. Please let me know if there is better
solution. Thanks a lot.


More information about the webkit-reviews mailing list