Title: [261351] branches/safari-610.1.12-branch/Source/WebCore
Revision
261351
Author
alanc...@apple.com
Date
2020-05-07 16:50:38 -0700 (Thu, 07 May 2020)

Log Message

Cherry-pick r261245. rdar://problem/62995531

    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.

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

Modified Paths

Diff

Modified: branches/safari-610.1.12-branch/Source/WebCore/ChangeLog (261350 => 261351)


--- branches/safari-610.1.12-branch/Source/WebCore/ChangeLog	2020-05-07 23:50:36 UTC (rev 261350)
+++ branches/safari-610.1.12-branch/Source/WebCore/ChangeLog	2020-05-07 23:50:38 UTC (rev 261351)
@@ -1,3 +1,32 @@
+2020-05-07  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r261245. rdar://problem/62995531
+
+    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.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@261245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-02  Simon Fraser  <simon.fra...@apple.com>
 
         Add a log channel for OverlayScrollbars

Modified: branches/safari-610.1.12-branch/Source/WebCore/page/TextIndicator.cpp (261350 => 261351)


--- branches/safari-610.1.12-branch/Source/WebCore/page/TextIndicator.cpp	2020-05-07 23:50:36 UTC (rev 261350)
+++ branches/safari-610.1.12-branch/Source/WebCore/page/TextIndicator.cpp	2020-05-07 23:50:38 UTC (rev 261351)
@@ -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