Title: [109775] trunk/Source/WebCore
Revision
109775
Author
ander...@apple.com
Date
2012-03-05 11:26:02 -0800 (Mon, 05 Mar 2012)

Log Message

Fix crash in ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition
https://bugs.webkit.org/show_bug.cgi?id=80303
<rdar://problem/10953682>

Reviewed by Beth Dakin.

Add the same null checks that already exist in updateMainFrameScrollPosition.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (109774 => 109775)


--- trunk/Source/WebCore/ChangeLog	2012-03-05 19:15:53 UTC (rev 109774)
+++ trunk/Source/WebCore/ChangeLog	2012-03-05 19:26:02 UTC (rev 109775)
@@ -1,3 +1,16 @@
+2012-03-05  Anders Carlsson  <ander...@apple.com>
+
+        Fix crash in ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition
+        https://bugs.webkit.org/show_bug.cgi?id=80303
+        <rdar://problem/10953682>
+
+        Reviewed by Beth Dakin.
+
+        Add the same null checks that already exist in updateMainFrameScrollPosition.
+
+        * page/scrolling/ScrollingCoordinator.cpp:
+        (WebCore::ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition):
+
 2012-03-05  Alexander Pavlov  <apav...@chromium.org>
 
         Web Inspector: CSS inactive property check should account for vendor prefixes

Modified: trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp (109774 => 109775)


--- trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-03-05 19:15:53 UTC (rev 109774)
+++ trunk/Source/WebCore/page/scrolling/ScrollingCoordinator.cpp	2012-03-05 19:26:02 UTC (rev 109775)
@@ -265,7 +265,14 @@
 void ScrollingCoordinator::updateMainFrameScrollPositionAndScrollLayerPosition(const IntPoint& scrollPosition)
 {
 #if USE(ACCELERATED_COMPOSITING)
+    ASSERT(isMainThread());
+
+    if (!m_page)
+        return;
+
     FrameView* frameView = m_page->mainFrame()->view();
+    if (!frameView)
+        return;
 
     // Make sure to update the main frame scroll position before changing the scroll layer position,
     // otherwise we'll introduce jittering on pages with slow repaint objects (like background-attachment: fixed).
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to