Bug 66864 - JSHTMLImageElement (and associated Node) is abandoned when image load is canceled
Summary: JSHTMLImageElement (and associated Node) is abandoned when image load is canc...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2011-08-24 10:28 PDT by Sam Weinig
Modified: 2011-08-24 11:28 PDT (History)
0 users

See Also:


Attachments
Patch (1.68 KB, patch)
2011-08-24 10:35 PDT, Sam Weinig
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2011-08-24 10:28:31 PDT
JSHTMLImageElement (and associated Node) is abandoned when image load is canceled
Comment 1 Sam Weinig 2011-08-24 10:34:07 PDT
In the JSC bindings, we use HTMLImageElement::hasPendingActivity() (which in turn calls HTMLImageLoader::haveFiredLoadEvent()) to reason about the liveness of JSHTMLImageElements.  In the case that an image load is canceled, the haveFiredLoadEvent never true, so the JSHTMLImageElement is kept alive forever (and since it references the global object, it keeps the entire graph alive as well).
Comment 2 Sam Weinig 2011-08-24 10:35:48 PDT
Created attachment 105015 [details]
Patch
Comment 3 Sam Weinig 2011-08-24 10:37:38 PDT
<rdar://problem/9925630>
Comment 4 Sam Weinig 2011-08-24 11:28:16 PDT
Committed r93717: <http://trac.webkit.org/changeset/93717>