Title: [258788] branches/safari-609.2.1.2-branch/Source/WebCore
Revision
258788
Author
alanc...@apple.com
Date
2020-03-20 14:15:35 -0700 (Fri, 20 Mar 2020)

Log Message

Cherry-pick r258267. rdar://problem/60703602

    Consolidate detachment of document timeline into Document::commonTeardown.
    https://bugs.webkit.org/show_bug.cgi?id=208786
    <rdar://problem/59936716>

    Patch by Jack Lee <shihchieh_...@apple.com> on 2020-03-11
    Reviewed by Ryosuke Niwa.

    Move detachment of DocumentTimeline to Document::commonTeardown().

    No new tests. Covered by existing document tests.

    * dom/Document.cpp:
    (WebCore::Document::removedLastRef):
    (WebCore::Document::commonTeardown):
    (WebCore::Document::prepareForDestruction):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258267 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog (258787 => 258788)


--- branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog	2020-03-20 20:58:54 UTC (rev 258787)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/ChangeLog	2020-03-20 21:15:35 UTC (rev 258788)
@@ -1,4 +1,4 @@
-2020-03-17  Kocsen Chung  <kocsen_ch...@apple.com>
+b'2020-03-20  Alan Coon  <alanc...@apple.com>\n\n        Cherry-pick r258267. rdar://problem/60703602\n\n    Consolidate detachment of document timeline into Document::commonTeardown.\n    https://bugs.webkit.org/show_bug.cgi?id=208786\n    <rdar://problem/59936716>\n    \n    Patch by Jack Lee <shihchieh_...@apple.com> on 2020-03-11\n    Reviewed by Ryosuke Niwa.\n    \n    Move detachment of DocumentTimeline to Document::commonTeardown().\n    \n    No new tests. Covered by existing document tests.\n    \n    * dom/Document.cpp:\n    (WebCore::Document::removedLastRef):\n    (WebCore::Document::commonTeardown):\n    (WebCore::Document::prepareForDestruction):\n    \n    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@258267 268f45cc-cd09-0410-ab3c-d52691b4dbfc\n\n    2020-03-11  Jack Lee  <shihchieh_...@apple.com>\n\n            Consolidate detachment of document timeline into Document::commonTeardown.\n            https://bugs.webkit.
 org/show_bug.cgi?id=208786\n            <rdar://problem/59936716>\n\n            Reviewed by Ryosuke Niwa.\n\n            Move detachment of DocumentTimeline to Document::commonTeardown().\n\n            No new tests. Covered by existing document tests.\n\n            * dom/Document.cpp:\n            (WebCore::Document::removedLastRef):\n            (WebCore::Document::commonTeardown):\n            (WebCore::Document::prepareForDestruction):\n\n'2020-03-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
         Cherry-pick r255997. rdar://problem/60507340
 

Modified: branches/safari-609.2.1.2-branch/Source/WebCore/dom/Document.cpp (258787 => 258788)


--- branches/safari-609.2.1.2-branch/Source/WebCore/dom/Document.cpp	2020-03-20 20:58:54 UTC (rev 258787)
+++ branches/safari-609.2.1.2-branch/Source/WebCore/dom/Document.cpp	2020-03-20 21:15:35 UTC (rev 258788)
@@ -757,7 +757,7 @@
 #endif
         decrementReferencingNodeCount();
     } else {
-        stopActiveDOMObjects();
+        commonTeardown();
 #ifndef NDEBUG
         m_inRemovedLastRefFunction = false;
         m_deletionHasBegun = true;
@@ -783,6 +783,10 @@
         m_highlightMap->clear();
 
     m_pendingScrollEventTargetList = nullptr;
+
+    while (!m_timelines.computesEmpty())
+        m_timelines.begin()->detachFromDocument();
+    m_timeline = nullptr;
 }
 
 Element* Document::elementForAccessKey(const String& key)
@@ -2577,10 +2581,6 @@
 
     detachFromFrame();
 
-    while (!m_timelines.computesEmpty())
-        m_timelines.begin()->detachFromDocument();
-    m_timeline = nullptr;
-
 #if ENABLE(CSS_PAINTING_API)
     for (auto& scope : m_paintWorkletGlobalScopes.values())
         scope->prepareForDestruction();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to