Changeset 143785 in webkit


Ignore:
Timestamp:
Feb 22, 2013, 1:38:08 PM (12 years ago)
Author:
Beth Dakin
Message:

ScrollingStateTree::rootStateNode() should be null-checked since it can be null
https://bugs.webkit.org/show_bug.cgi?id=110631

Reviewed by Simon Fraser.

This is a speculative fix for <rdar://problem/13233090> and
<rdar://problem/12519348>. It is totally possible for rootStateNode() to be null,
so we should null-check it.

  • page/scrolling/mac/ScrollingCoordinatorMac.mm:

(WebCore::ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread):
(WebCore::ScrollingCoordinatorMac::syncChildPositions):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r143784 r143785  
     12013-02-22  Beth Dakin  <bdakin@apple.com>
     2
     3        ScrollingStateTree::rootStateNode() should be null-checked since it can be null
     4        https://bugs.webkit.org/show_bug.cgi?id=110631
     5
     6        Reviewed by Simon Fraser.
     7
     8        This is a speculative fix for <rdar://problem/13233090> and
     9        <rdar://problem/12519348>. It is totally possible for rootStateNode() to be null,
     10        so we should null-check it.
     11
     12        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
     13        (WebCore::ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread):
     14        (WebCore::ScrollingCoordinatorMac::syncChildPositions):
     15
    1162013-02-22  Mike Reed  <reed@google.com>
    217
  • trunk/Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm

    r143418 r143785  
    315315void ScrollingCoordinatorMac::setShouldUpdateScrollLayerPositionOnMainThread(MainThreadScrollingReasons reasons)
    316316{
     317    if (!m_scrollingStateTree->rootStateNode())
     318        return;
     319
    317320    // The FrameView's GraphicsLayer is likely to be out-of-synch with the PlatformLayer
    318321    // at this point. So we'll update it before we switch back to main thread scrolling
     
    341344void ScrollingCoordinatorMac::syncChildPositions(const LayoutRect& viewportRect)
    342345{
     346    if (!m_scrollingStateTree->rootStateNode())
     347        return;
     348
    343349    Vector<OwnPtr<ScrollingStateNode> >* children = m_scrollingStateTree->rootStateNode()->children();
    344350    if (!children)
Note: See TracChangeset for help on using the changeset viewer.