Use CoreAnimation fences instead of synchronous IPC to synchronize resize
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jul 2015 22:29:07 +0000 (22:29 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jul 2015 22:29:07 +0000 (22:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=146294
<rdar://problem/21090193>

Reviewed by Anders Carlsson.

* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
Tiny followup; don't touch Connection if the connection isn't valid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@186693 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm

index 12422a9..0e239b7 100644 (file)
@@ -1,3 +1,15 @@
+2015-07-10  Tim Horton  <timothy_horton@apple.com>
+
+        Use CoreAnimation fences instead of synchronous IPC to synchronize resize
+        https://bugs.webkit.org/show_bug.cgi?id=146294
+        <rdar://problem/21090193>
+
+        Reviewed by Anders Carlsson.
+
+        * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
+        (WebKit::TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate):
+        Tiny followup; don't touch Connection if the connection isn't valid.
+
 2015-07-10  Chris Dumez  <cdumez@apple.com>
 
         [WK2] Increase the QoS of some of our WorkQueues to match the one of our processes
index 6a22cbb..a0d5c92 100644 (file)
@@ -153,6 +153,9 @@ void TiledCoreAnimationDrawingAreaProxy::willSendUpdateGeometry()
 MachSendRight TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate()
 {
 #if HAVE(COREANIMATION_FENCES)
+    if (!m_webPageProxy.isValid())
+        return MachSendRight();
+
     RetainPtr<CAContext> rootLayerContext = [asLayer(m_webPageProxy.acceleratedCompositingRootLayer()) context];
     if (!rootLayerContext)
         return MachSendRight();
@@ -173,6 +176,8 @@ MachSendRight TiledCoreAnimationDrawingAreaProxy::createFenceForGeometryUpdate()
     });
     RefPtr<WebPageProxy> retainedPage = &m_webPageProxy;
     [CATransaction addCommitHandler:[callbackID, retainedPage] {
+        if (!retainedPage->isValid())
+            return;
         if (Connection* connection = retainedPage->process().connection())
             connection->uninstallIncomingSyncMessageCallback(callbackID);
     } forPhase:kCATransactionPhasePostCommit];