Changeset 201466 in webkit


Ignore:
Timestamp:
May 27, 2016 1:32:42 PM (8 years ago)
Author:
akling@apple.com
Message:

Document abandons its EventTargetData.
<https://webkit.org/b/158158>

Reviewed by Darin Adler.

Node::willBeDeletedFrom() is called when destroying all Node types *except* Document.
If a Document had an associated EventTargetData, it would not get cleaned up.

This patch moves the EventTargetData cleanup to ~Node() where it's guaranteed to run.

  • dom/Node.cpp:

(WebCore::Node::~Node):
(WebCore::Node::willBeDeletedFrom):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r201463 r201466  
     12016-05-27  Andreas Kling  <akling@apple.com>
     2
     3        Document abandons its EventTargetData.
     4        <https://webkit.org/b/158158>
     5
     6        Reviewed by Darin Adler.
     7
     8        Node::willBeDeletedFrom() is called when destroying all Node types *except* Document.
     9        If a Document had an associated EventTargetData, it would not get cleaned up.
     10
     11        This patch moves the EventTargetData cleanup to ~Node() where it's guaranteed to run.
     12
     13        * dom/Node.cpp:
     14        (WebCore::Node::~Node):
     15        (WebCore::Node::willBeDeletedFrom):
     16
    1172016-05-27  Ryan Haddad  <ryanhaddad@apple.com>
    218
  • trunk/Source/WebCore/dom/Node.cpp

    r201416 r201466  
    306306        willBeDeletedFrom(document());
    307307
     308    if (hasEventTargetData())
     309        clearEventTargetData();
     310
    308311    document().decrementReferencingNodeCount();
    309312}
     
    318321        // FIXME: This should call didRemoveTouchEventHandler().
    319322#endif
    320         clearEventTargetData();
    321323    }
    322324
Note: See TracChangeset for help on using the changeset viewer.