Title: [282390] trunk/Source/WebCore
- Revision
- 282390
- Author
- [email protected]
- Date
- 2021-09-14 08:53:16 -0700 (Tue, 14 Sep 2021)
Log Message
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.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (282389 => 282390)
--- trunk/Source/WebCore/ChangeLog 2021-09-14 15:45:03 UTC (rev 282389)
+++ trunk/Source/WebCore/ChangeLog 2021-09-14 15:53:16 UTC (rev 282390)
@@ -1,3 +1,21 @@
+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-14 Alan Bujtas <[email protected]>
[LFC][IFC] InlineDisplayContentBuilder should not operate on the global inline run list
Modified: trunk/Source/WebCore/dom/Document.cpp (282389 => 282390)
--- trunk/Source/WebCore/dom/Document.cpp 2021-09-14 15:45:03 UTC (rev 282389)
+++ trunk/Source/WebCore/dom/Document.cpp 2021-09-14 15:53:16 UTC (rev 282390)
@@ -2144,6 +2144,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