[Webkit-unassigned] [Bug 104830] New: Document will never be released when an Image is created inside unload event listener.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 12 12:04:26 PST 2012


https://bugs.webkit.org/show_bug.cgi?id=104830

           Summary: Document will never be released when an Image is
                    created inside unload event listener.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Page Loading
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yongjun_zhang at apple.com


If we create an Image object inside unload event listener and set src attribute to it, the Document will never be released.  As shown in the following HTML:

<html> <head> 
<script type="text/javascript">
 window.onunload = unloadPage;

p = [];
function unloadPage()
{
 p[0] = new Image;
 p[0].src = "https://www.my_random_testpage.com/image.png";
}

function reload()
{
    setTimeout(function() {location.reload();}, 500);
}
</script>
</head>
 <body onload="reload()">
</body> </html>

In mac, running "heap" periodically will show the number of HTMLDocument keeps growing.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list