Bug 51062 - [chromium] AssociatedURLLoader leaks m_realLoader to its WebURLLoaderClient.
Summary: [chromium] AssociatedURLLoader leaks m_realLoader to its WebURLLoaderClient.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Fisher (:fishd, Google)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 15:00 PST by Darin Fisher (:fishd, Google)
Modified: 2010-12-15 16:13 PST (History)
2 users (show)

See Also:


Attachments
v1 patch (5.81 KB, patch)
2010-12-14 15:02 PST, Darin Fisher (:fishd, Google)
dglazkov: review+
dglazkov: commit-queue+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Fisher (:fishd, Google) 2010-12-14 15:00:44 PST
[chromium] AssociatedURLLoader leaks m_realLoader to its WebURLLoaderClient.

AssociatedURLLoader should implement WebURLLoaderClient so that it can intercept
client callbacks and modify the WebURLLoader parameter to be |this|.
Comment 1 Darin Fisher (:fishd, Google) 2010-12-14 15:02:12 PST
Created attachment 76577 [details]
v1 patch
Comment 2 Eric Seidel (no email) 2010-12-14 15:30:31 PST
Am I understanding correctly that the WebKit API layer was leaking an internal WebKit (or WebCore?) object?
Comment 3 Eric Seidel (no email) 2010-12-14 15:30:46 PST
Leaking in the sense of "providing a pointer to".
Comment 4 Darin Fisher (:fishd, Google) 2010-12-14 20:47:56 PST
(In reply to comment #2)
> Am I understanding correctly that the WebKit API layer was leaking an internal WebKit (or WebCore?) object?

Nope.  AssociatedURLLoader is a WebURLLoader implementation.  It is implemented in terms of the stock WebURLLoader accessible from WebKitClient::createURLLoader().  That internal WebURLLoader was being exposed via WebURLLoaderClient methods.

For background, AssociatedURLLoader is allocated via WebFrame::createAssociatedURLLoader().  That method provides a WebURLLoader implementation that can be used to load an URL that should be treated like a subresource of the frame (e.g., it should be subject to cancellation when window.stop() is called, it should be subject to appcache, etc.).  The present implementation does not do all of these things yet.  I plan on changing AssociatedURLLoader to be based on WebCore::ResourceLoader so that it can.
Comment 5 Darin Fisher (:fishd, Google) 2010-12-15 16:13:06 PST
Landed as http://trac.webkit.org/changeset/74161