Put a better version of the assertion back, and add one when we ensureBackingStore.
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 May 2014 01:16:53 +0000 (01:16 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 May 2014 01:16:53 +0000 (01:16 +0000)
Reviewed by Tim Horton.

* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::ensureBackingStore):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebPage/mac/PlatformCALayerRemote.cpp

index 77c2fbd..3c3baed 100644 (file)
@@ -1,5 +1,15 @@
 2014-05-07  Simon Fraser  <simon.fraser@apple.com>
 
+        Put a better version of the assertion back, and add one when we ensureBackingStore.
+
+        Reviewed by Tim Horton.
+
+        * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
+        (WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
+        (WebKit::PlatformCALayerRemote::ensureBackingStore):
+
+2014-05-07  Simon Fraser  <simon.fraser@apple.com>
+
         This assertion was wrong and fired every time. Remove it.
 
         * WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
index 4d45797..3735e23 100644 (file)
@@ -118,6 +118,8 @@ PlatformCALayerRemote::~PlatformCALayerRemote()
 
 void PlatformCALayerRemote::recursiveBuildTransaction(RemoteLayerTreeTransaction& transaction)
 {
+    ASSERT(!m_properties.backingStore || owner());
+    
     if (m_properties.backingStore && (!owner() || !owner()->platformCALayerDrawsContent())) {
         m_properties.backingStore = nullptr;
         m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::BackingStoreChanged);
@@ -167,6 +169,8 @@ void PlatformCALayerRemote::animationStarted(CFTimeInterval beginTime)
 
 void PlatformCALayerRemote::ensureBackingStore()
 {
+    ASSERT(owner());
+    
     if (!m_properties.backingStore)
         m_properties.backingStore = std::make_unique<RemoteLayerBackingStore>(m_context);