Title: [118066] trunk/Source/WebKit2
Revision
118066
Author
[email protected]
Date
2012-05-22 15:27:06 -0700 (Tue, 22 May 2012)

Log Message

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):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (118065 => 118066)


--- trunk/Source/WebKit2/ChangeLog	2012-05-22 22:26:22 UTC (rev 118065)
+++ trunk/Source/WebKit2/ChangeLog	2012-05-22 22:27:06 UTC (rev 118066)
@@ -1,5 +1,18 @@
 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-22  Anders Carlsson  <[email protected]>
+
         Crash when a plug-in view outlives its containing WebPage
         https://bugs.webkit.org/show_bug.cgi?id=87163
         <rdar://problem/10849258>

Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (118065 => 118066)


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-22 22:26:22 UTC (rev 118065)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2012-05-22 22:27:06 UTC (rev 118066)
@@ -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