Title: [176733] trunk/Source/WebKit2
Revision
176733
Author
[email protected]
Date
2014-12-03 11:59:27 -0800 (Wed, 03 Dec 2014)

Log Message

Use an @autoreleasepool instead of NSAutoreleasePool.

Rubber-stamped by Tim Horton.

* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (176732 => 176733)


--- trunk/Source/WebKit2/ChangeLog	2014-12-03 19:55:42 UTC (rev 176732)
+++ trunk/Source/WebKit2/ChangeLog	2014-12-03 19:59:27 UTC (rev 176733)
@@ -1,3 +1,12 @@
+2014-12-03  Anders Carlsson  <[email protected]>
+
+        Use an @autoreleasepool instead of NSAutoreleasePool.
+
+        Rubber-stamped by Tim Horton.
+
+        * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+        (WebKit::TiledCoreAnimationDrawingArea::flushLayers):
+
 2014-12-03  Dan Bernstein  <[email protected]>
 
         REGRESSION(r176687): Caused webkit2 test assertion failure crashes in WebKit::WebPage::willStartDrag()

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


--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2014-12-03 19:55:42 UTC (rev 176732)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm	2014-12-03 19:59:27 UTC (rev 176733)
@@ -295,38 +295,36 @@
 {
     ASSERT(!m_layerTreeStateIsFrozen);
 
-    // This gets called outside of the normal event loop so wrap in an autorelease pool
-    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+    @autoreleasepool {
+        m_webPage.layoutIfNeeded();
 
-    m_webPage.layoutIfNeeded();
+        updateIntrinsicContentSizeIfNeeded();
 
-    updateIntrinsicContentSizeIfNeeded();
+        if (m_pendingRootLayer) {
+            setRootCompositingLayer(m_pendingRootLayer.get());
+            m_pendingRootLayer = nullptr;
+        }
 
-    if (m_pendingRootLayer) {
-        setRootCompositingLayer(m_pendingRootLayer.get());
-        m_pendingRootLayer = nullptr;
-    }
+        FloatRect visibleRect = [m_hostingLayer frame];
+        visibleRect.intersect(m_scrolledExposedRect);
 
-    FloatRect visibleRect = [m_hostingLayer frame];
-    visibleRect.intersect(m_scrolledExposedRect);
+        // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
+        if (m_viewOverlayRootLayer)
+            m_viewOverlayRootLayer->flushCompositingState(visibleRect);
 
-    // Because our view-relative overlay root layer is not attached to the main GraphicsLayer tree, we need to flush it manually.
-    if (m_viewOverlayRootLayer)
-        m_viewOverlayRootLayer->flushCompositingState(visibleRect);
+        bool returnValue = m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
+    #if ENABLE(ASYNC_SCROLLING)
+        if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator())
+            scrollingCoordinator->commitTreeStateIfNeeded();
+    #endif
 
-    bool returnValue = m_webPage.mainFrameView()->flushCompositingStateIncludingSubframes();
-#if ENABLE(ASYNC_SCROLLING)
-    if (ScrollingCoordinator* scrollingCoordinator = m_webPage.corePage()->scrollingCoordinator())
-        scrollingCoordinator->commitTreeStateIfNeeded();
-#endif
+        // If we have an active transient zoom, we want the zoom to win over any changes
+        // that WebCore makes to the relevant layers, so re-apply our changes after flushing.
+        if (m_transientZoomScale != 1)
+            applyTransientZoomToLayers(m_transientZoomScale, m_transientZoomOrigin);
 
-    // If we have an active transient zoom, we want the zoom to win over any changes
-    // that WebCore makes to the relevant layers, so re-apply our changes after flushing.
-    if (m_transientZoomScale != 1)
-        applyTransientZoomToLayers(m_transientZoomScale, m_transientZoomOrigin);
-
-    [pool drain];
-    return returnValue;
+        return returnValue;
+    }
 }
 
 void TiledCoreAnimationDrawingArea::viewStateDidChange(ViewState::Flags changed, bool wantsDidUpdateViewState)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to