[webkit-reviews] review requested: [Bug 30457] Allow image requests started from unload handlers to outlive the page : [Attachment 47350] Patch without the crash

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jan 25 09:25:36 PST 2010


Nate Chapin <japhet at chromium.org> has asked  for review:
Bug 30457: Allow image requests started from unload handlers to outlive the
page
https://bugs.webkit.org/show_bug.cgi?id=30457

Attachment 47350: Patch without the crash
https://bugs.webkit.org/attachment.cgi?id=47350&action=review

------- Additional Comments from Nate Chapin <japhet at chromium.org>
The additions to http://trac.webkit.org/changeset/52446 can be summarized as
such:
Request.h/cpp : In addition to the Frame, maintain RefPtrs to the Document and
DocumentLoader in the case of a request that can outlive the page.
DocumentLoader.cpp / ResourceLoader.cpp : Allow for the possibility that
Frame::page() and Frame::settings() may be null (as can now be the case if the
unload event is triggered by closing rather than navigating).
FrameLoader.h/cpp : Keep a count of the number of requests that may outlive the

page that refer to this FrameLoader, and don't allow m_documentLoader to be
nulled if that count is non-zero.

I'm not sure that this is a good solution, but it does appear to stop the
crashing.  It seems to me, though, that I've allowed the possibility that, when

an OutlivePage Request is executed, FrameLoader::m_documentLoader will not be
the DocumentLoader that originally associated with the Request.  Is that a Bad
Thing?


More information about the webkit-reviews mailing list