Bug 101654 - Node::removedFrom could be renamed
Summary: Node::removedFrom could be renamed
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 15:20 PST by Stephen Chenney
Modified: 2017-07-18 08:29 PDT (History)
7 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Chenney 2012-11-08 15:20:31 PST
Node::removedFrom is not called when a node is removed due to Document::removedLastRef. In that case, as an optimization, we just call the destructor (it is also rumored that this is the reason we do not issue onunload on frame destruction).

We need a better name for removedFrom, or some other mechanism, to remind implementors that anything they do to clean up pointers etc must be done in both the destructor and removedFrom.
Comment 1 Stephen Chenney 2012-11-08 16:11:41 PST
See http://trac.webkit.org/changeset/113852 as another example of a bug due to this behavior.
Comment 2 Abhishek Arya 2012-11-15 16:15:33 PST
and https://bugs.webkit.org/show_bug.cgi?id=101505