Title: [261245] trunk/Source/WebCore
Revision
261245
Author
timothy_hor...@apple.com
Date
2020-05-06 12:36:26 -0700 (Wed, 06 May 2020)

Log Message

REGRESSION (r260753): Frequent crashes under TextIndicator's estimatedTextColorsForRange
https://bugs.webkit.org/show_bug.cgi?id=211523
<rdar://problem/62860203>

Reviewed by Darin Adler.

* page/TextIndicator.cpp:
(WebCore::estimatedTextColorsForRange):
TextIterator's node() getter can return null. r260753 accidentally refactored away the null check.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (261244 => 261245)


--- trunk/Source/WebCore/ChangeLog	2020-05-06 19:09:26 UTC (rev 261244)
+++ trunk/Source/WebCore/ChangeLog	2020-05-06 19:36:26 UTC (rev 261245)
@@ -1,3 +1,15 @@
+2020-05-06  Tim Horton  <timothy_hor...@apple.com>
+
+        REGRESSION (r260753): Frequent crashes under TextIndicator's estimatedTextColorsForRange
+        https://bugs.webkit.org/show_bug.cgi?id=211523
+        <rdar://problem/62860203>
+
+        Reviewed by Darin Adler.
+
+        * page/TextIndicator.cpp:
+        (WebCore::estimatedTextColorsForRange):
+        TextIterator's node() getter can return null. r260753 accidentally refactored away the null check.
+
 2020-05-06  John Wilander  <wilan...@apple.com>
 
         Exempt app-bound domains from ITP's website data deletion and third-party cookie blocking between themselves

Modified: trunk/Source/WebCore/page/TextIndicator.cpp (261244 => 261245)


--- trunk/Source/WebCore/page/TextIndicator.cpp	2020-05-06 19:09:26 UTC (rev 261244)
+++ trunk/Source/WebCore/page/TextIndicator.cpp	2020-05-06 19:36:26 UTC (rev 261245)
@@ -199,7 +199,10 @@
 {
     HashSet<Color> colors;
     for (TextIterator iterator(range); !iterator.atEnd(); iterator.advance()) {
-        auto renderer = iterator.node()->renderer();
+        auto node = iterator.node();
+        if (!node)
+            continue;
+        auto renderer = node->renderer();
         if (is<RenderText>(renderer))
             colors.add(renderer->style().color());
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to