Title: [282580] branches/safari-612-branch/Source/WebCore
Revision
282580
Author
[email protected]
Date
2021-09-16 11:48:50 -0700 (Thu, 16 Sep 2021)

Log Message

Cherry-pick r282390. rdar://problem/83183334

    Don't schedule text rendering updates for a non-rendered Document
    https://bugs.webkit.org/show_bug.cgi?id=230246
    rdar://81905586

    Reviewed by Anders Carlsson.

    Memory use could grow without limit as these updates would not get cleared until
    the document was destroyed.

    No test, hard to make a reasonable regression test as the memory growth is not extreme.

    * dom/Document.cpp:
    (WebCore::Document::updateTextRenderer):

    Bail out if the Document has no render tree.

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

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (282579 => 282580)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-16 18:48:47 UTC (rev 282579)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-09-16 18:48:50 UTC (rev 282580)
@@ -1,5 +1,46 @@
 2021-09-16  Russell Epstein  <[email protected]>
 
+        Cherry-pick r282390. rdar://problem/83183334
+
+    Don't schedule text rendering updates for a non-rendered Document
+    https://bugs.webkit.org/show_bug.cgi?id=230246
+    rdar://81905586
+    
+    Reviewed by Anders Carlsson.
+    
+    Memory use could grow without limit as these updates would not get cleared until
+    the document was destroyed.
+    
+    No test, hard to make a reasonable regression test as the memory growth is not extreme.
+    
+    * dom/Document.cpp:
+    (WebCore::Document::updateTextRenderer):
+    
+    Bail out if the Document has no render tree.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282390 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-14  Antti Koivisto  <[email protected]>
+
+            Don't schedule text rendering updates for a non-rendered Document
+            https://bugs.webkit.org/show_bug.cgi?id=230246
+            rdar://81905586
+
+            Reviewed by Anders Carlsson.
+
+            Memory use could grow without limit as these updates would not get cleared until
+            the document was destroyed.
+
+            No test, hard to make a reasonable regression test as the memory growth is not extreme.
+
+            * dom/Document.cpp:
+            (WebCore::Document::updateTextRenderer):
+
+            Bail out if the Document has no render tree.
+
+2021-09-16  Russell Epstein  <[email protected]>
+
         Cherry-pick r282370. rdar://problem/83183884
 
     [macOS] -toggleAutomaticSpellingCorrection: menu item validation shouldn't require post-layout editor state

Modified: branches/safari-612-branch/Source/WebCore/dom/Document.cpp (282579 => 282580)


--- branches/safari-612-branch/Source/WebCore/dom/Document.cpp	2021-09-16 18:48:47 UTC (rev 282579)
+++ branches/safari-612-branch/Source/WebCore/dom/Document.cpp	2021-09-16 18:48:50 UTC (rev 282580)
@@ -2141,6 +2141,9 @@
 
 void Document::updateTextRenderer(Text& text, unsigned offsetOfReplacedText, unsigned lengthOfReplacedText)
 {
+    if (!hasLivingRenderTree())
+        return;
+
     if (!m_pendingRenderTreeTextUpdate)
         m_pendingRenderTreeTextUpdate = makeUnique<Style::Update>(*this);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to