Title: [118427] branches/safari-536-branch/Source/WebKit2
Revision
118427
Author
[email protected]
Date
2012-05-24 15:19:48 -0700 (Thu, 24 May 2012)

Log Message

Merged r118066 -> <rdar://problem/11474087>

Modified Paths

Diff

Modified: branches/safari-536-branch/Source/WebKit2/ChangeLog (118426 => 118427)


--- branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-05-24 22:18:20 UTC (rev 118426)
+++ branches/safari-536-branch/Source/WebKit2/ChangeLog	2012-05-24 22:19:48 UTC (rev 118427)
@@ -1,5 +1,22 @@
 2012-05-24  Lucas Forschler  <[email protected]>
 
+    Merge 118066
+
+    2012-05-22  Anders Carlsson  <[email protected]>
+
+            Functions dispatched by dispatchAfterEnsuringUpdatedScrollPosition can be called after drawing area has been destroyed
+            https://bugs.webkit.org/show_bug.cgi?id=87173
+            <rdar://problem/11474087>
+
+            Reviewed by Beth Dakin.
+
+            Don't try to call forceRepaint if the drawing area has already been destroyed.
+
+            * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+            (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
+
+2012-05-24  Lucas Forschler  <[email protected]>
+
     Merge 118060
 
     2012-05-22  Anders Carlsson  <[email protected]>

Modified: branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (118426 => 118427)


--- branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-24 22:18:20 UTC (rev 118426)
+++ branches/safari-536-branch/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-24 22:19:48 UTC (rev 118427)
@@ -142,9 +142,15 @@
     if (m_layerTreeStateIsFrozen)
         return false;
 
+    // FIXME: It is possible for the drawing area to be destroyed before the bound block
+    // is invoked, so grab a reference to the web page here so we can access the drawing area through it.
+    // (The web page is already kept alive by dispatchAfterEnsuringUpdatedScrollPosition).
+    // A better fix would be to make sure that we keep the drawing area alive if there are outstanding calls.
+    WebPage* webPage = m_webPage;
     dispatchAfterEnsuringUpdatedScrollPosition(bind(^{
-        m_webPage->drawingArea()->forceRepaint();
-        m_webPage->send(Messages::WebPageProxy::VoidCallback(callbackID));
+        if (DrawingArea* drawingArea = webPage->drawingArea())
+            drawingArea->forceRepaint();
+        webPage->send(Messages::WebPageProxy::VoidCallback(callbackID));
     }));
     return true;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to