[webkit-reviews] review requested: [Bug 30457] Allow image requests started from unload handlers to outlive the page : [Attachment 62328] Rewrite at ResourceHandleClient level

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jul 22 12:59:01 PDT 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 62328: Rewrite at ResourceHandleClient level
https://bugs.webkit.org/attachment.cgi?id=62328&action=review

------- Additional Comments from Nate Chapin <japhet at chromium.org>
This patch uses a new class, PingLoader, to handle this family of loads. 
PingLoader subclasses ResourceHandleClient, so it doesn't need to keep any
external references (except to the ResourceHandle it created) and won't be
cancelable when a FrameLoader is stopped.  The PingLoader triggers a load by
creating a ResourceHandle and waits for a callback indicating that a response
was received or that the load failed.  As soon as such a callback is received,
the load is cancelled and the PingLoader deletes itself.

Testing this patch is a bit tricky.  Because we aren't making use of
ResourceLoader, these loads are invisible to
layoutTestController.dumpResourceLoadCallbacks().  The attached test creates an
image load in the unload handler, and the resource loaded as an image sets a
cookie.  We then wait for the document.cookie to visible to be set and pass
when it does.


More information about the webkit-reviews mailing list