Title: [260199] trunk/Source/WebCore
Revision
260199
Author
[email protected]
Date
2020-04-16 11:04:26 -0700 (Thu, 16 Apr 2020)

Log Message

Captured ThreadedScrollingTree should check its m_scrollingCoordinator before calling its methods
https://bugs.webkit.org/show_bug.cgi?id=210570

Patch by Said Abou-Hallawa <[email protected]> on 2020-04-16
Reviewed by Simon Fraser.

m_scrollingCoordinator may be nullified before asynchronously calling its
method scheduleUpdateScrollPositionAfterAsyncScroll(). Check if it is
not null before calling this method.

* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (260198 => 260199)


--- trunk/Source/WebCore/ChangeLog	2020-04-16 17:44:19 UTC (rev 260198)
+++ trunk/Source/WebCore/ChangeLog	2020-04-16 18:04:26 UTC (rev 260199)
@@ -1,3 +1,17 @@
+2020-04-16  Said Abou-Hallawa  <[email protected]>
+
+        Captured ThreadedScrollingTree should check its m_scrollingCoordinator before calling its methods
+        https://bugs.webkit.org/show_bug.cgi?id=210570
+
+        Reviewed by Simon Fraser.
+
+        m_scrollingCoordinator may be nullified before asynchronously calling its
+        method scheduleUpdateScrollPositionAfterAsyncScroll(). Check if it is
+        not null before calling this method.
+
+        * page/scrolling/ThreadedScrollingTree.cpp:
+        (WebCore::ThreadedScrollingTree::scrollingTreeNodeDidScroll):
+
 2020-04-16  Zalan Bujtas  <[email protected]>
 
         Crash in IndefiniteSizeStrategy::recomputeUsedFlexFractionIfNeeded when min-size can not be resolved

Modified: trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp (260198 => 260199)


--- trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2020-04-16 17:44:19 UTC (rev 260198)
+++ trunk/Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp	2020-04-16 18:04:26 UTC (rev 260199)
@@ -141,7 +141,8 @@
 #endif
 
     RunLoop::main().dispatch([strongThis = makeRef(*this), nodeID = node.scrollingNodeID(), scrollPosition, layoutViewportOrigin, scrollingLayerPositionAction] {
-        strongThis->m_scrollingCoordinator->scheduleUpdateScrollPositionAfterAsyncScroll(nodeID, scrollPosition, layoutViewportOrigin, scrollingLayerPositionAction);
+        if (auto* scrollingCoordinator = strongThis->m_scrollingCoordinator.get())
+            scrollingCoordinator->scheduleUpdateScrollPositionAfterAsyncScroll(nodeID, scrollPosition, layoutViewportOrigin, scrollingLayerPositionAction);
     });
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to