[Webkit-unassigned] [Bug 66181] HTMLPlugInElement persists until page teardown if the plugin requests the script object for it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Aug 26 13:53:00 PDT 2011


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





--- Comment #17 from wez at chromium.org  2011-08-26 13:53:00 PST ---
(In reply to comment #16)
> Thank you! I guess cross-platform code is the right place for the fix then.
> 
> Are plug-ins completely torn down when an element is removed from document (and then re-created from scratch if the element is put back)?

My understanding is that plugin lifetimes are tied to the relevant render widgets; if the element is removed or hidden then the plugin will be destroyed.  If that is correct then the script object could be cleared in detach() instead, but I chose to be conservative since I couldn't find any documentation of the intended behaviour.  Things behave as described above under Chromium, but I've not checked other browsers.

> +        Release the reference held by HTMLPlugInElement to the wrapping NPObject it may have created for itself, when the element is removed from the document.  This breaks a cyclical reference that would otherwise cause the element to be leaked.
> 
> Calling this a leak is misleading given that the memory is reclaimed when document is closed.

Yes, although from the point of view of a long-lived document, the two are indistinguishable.  I'll try to come up with more precise wording, though.

> CC'ing Anders, who would likely be the best reviewer for this patch anyway.

Thanks!

-- 
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