Title: [201466] trunk/Source/WebCore
Revision
201466
Author
[email protected]
Date
2016-05-27 13:32:42 -0700 (Fri, 27 May 2016)

Log 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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (201465 => 201466)


--- trunk/Source/WebCore/ChangeLog	2016-05-27 20:26:06 UTC (rev 201465)
+++ trunk/Source/WebCore/ChangeLog	2016-05-27 20:32:42 UTC (rev 201466)
@@ -1,3 +1,19 @@
+2016-05-27  Andreas Kling  <[email protected]>
+
+        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):
+
 2016-05-27  Ryan Haddad  <[email protected]>
 
         Attempt to fix the iOS build.

Modified: trunk/Source/WebCore/dom/Node.cpp (201465 => 201466)


--- trunk/Source/WebCore/dom/Node.cpp	2016-05-27 20:26:06 UTC (rev 201465)
+++ trunk/Source/WebCore/dom/Node.cpp	2016-05-27 20:32:42 UTC (rev 201466)
@@ -305,6 +305,9 @@
     if (!isContainerNode())
         willBeDeletedFrom(document());
 
+    if (hasEventTargetData())
+        clearEventTargetData();
+
     document().decrementReferencingNodeCount();
 }
 
@@ -317,7 +320,6 @@
 #else
         // FIXME: This should call didRemoveTouchEventHandler().
 #endif
-        clearEventTargetData();
     }
 
     if (AXObjectCache* cache = document.existingAXObjectCache())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to