Title: [219457] trunk/Source
Revision
219457
Author
commit-qu...@webkit.org
Date
2017-07-13 11:21:33 -0700 (Thu, 13 Jul 2017)

Log Message

Style fix. Replace strongThis with protectedThis.
https://bugs.webkit.org/show_bug.cgi?id=174444

Patch by Jeremy Jones <jere...@apple.com> on 2017-07-13
Reviewed by Eric Carlson.

Rename, no behavior change.

Source/WebCore:

* Modules/webaudio/AudioScheduledSourceNode.cpp:
(WebCore::AudioScheduledSourceNode::finish):
* platform/graphics/cocoa/WebCoreDecompressionSession.mm:
(WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaData):
(WebCore::WebCoreDecompressionSession::enqueueSample):
(WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
(WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
(WebCore::WebCoreDecompressionSession::requestMediaDataWhenReady):
(WebCore::WebCoreDecompressionSession::flush):

Source/WebKit2:

* WebProcess/cocoa/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
(WebKit::WebVideoFullscreenManager::didEnterFullscreen):
(WebKit::WebVideoFullscreenManager::didExitFullscreen):
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219456 => 219457)


--- trunk/Source/WebCore/ChangeLog	2017-07-13 18:19:38 UTC (rev 219456)
+++ trunk/Source/WebCore/ChangeLog	2017-07-13 18:21:33 UTC (rev 219457)
@@ -1,5 +1,24 @@
 2017-07-13  Jeremy Jones  <jere...@apple.com>
 
+        Style fix. Replace strongThis with protectedThis.
+        https://bugs.webkit.org/show_bug.cgi?id=174444
+
+        Reviewed by Eric Carlson.
+
+        Rename, no behavior change.
+
+        * Modules/webaudio/AudioScheduledSourceNode.cpp:
+        (WebCore::AudioScheduledSourceNode::finish):
+        * platform/graphics/cocoa/WebCoreDecompressionSession.mm:
+        (WebCore::WebCoreDecompressionSession::maybeBecomeReadyForMoreMediaData):
+        (WebCore::WebCoreDecompressionSession::enqueueSample):
+        (WebCore::WebCoreDecompressionSession::handleDecompressionOutput):
+        (WebCore::WebCoreDecompressionSession::enqueueDecodedSample):
+        (WebCore::WebCoreDecompressionSession::requestMediaDataWhenReady):
+        (WebCore::WebCoreDecompressionSession::flush):
+
+2017-07-13  Jeremy Jones  <jere...@apple.com>
+
         Fix block style in WebVideoFullscreen classes.
         https://bugs.webkit.org/show_bug.cgi?id=174446
 

Modified: trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp (219456 => 219457)


--- trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp	2017-07-13 18:19:38 UTC (rev 219456)
+++ trunk/Source/WebCore/Modules/webaudio/AudioScheduledSourceNode.cpp	2017-07-13 18:21:33 UTC (rev 219457)
@@ -167,8 +167,8 @@
     }
 
     if (m_hasEndedListener) {
-        callOnMainThread([strongThis = makeRef(*this)] () mutable {
-            strongThis->dispatchEvent(Event::create(eventNames().endedEvent, false, false));
+        callOnMainThread([protectedThis = makeRef(*this)] () mutable {
+            protectedThis->dispatchEvent(Event::create(eventNames().endedEvent, false, false));
         });
     }
 }

Modified: trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm (219456 => 219457)


--- trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm	2017-07-13 18:19:38 UTC (rev 219456)
+++ trunk/Source/WebCore/platform/graphics/cocoa/WebCoreDecompressionSession.mm	2017-07-13 18:21:33 UTC (rev 219457)
@@ -102,10 +102,10 @@
         return;
     }
 
-    RefPtr<WebCoreDecompressionSession> strongThis { this };
-    dispatch_async(dispatch_get_main_queue(), [strongThis] {
-        if (strongThis->m_notificationCallback)
-            strongThis->m_notificationCallback();
+    RefPtr<WebCoreDecompressionSession> protectedThis { this };
+    dispatch_async(dispatch_get_main_queue(), [protectedThis] {
+        if (protectedThis->m_notificationCallback)
+            protectedThis->m_notificationCallback();
     });
 }
 
@@ -175,8 +175,8 @@
 
     LOG(Media, "WebCoreDecompressionSession::enqueueSample(%p) - framesBeingDecoded(%d)", this, m_framesBeingDecoded);
 
-    dispatch_async(m_decompressionQueue.get(), [strongThis = makeRefPtr(*this), strongBuffer = retainPtr(sampleBuffer), displaying] {
-        strongThis->decodeSample(strongBuffer.get(), displaying);
+    dispatch_async(m_decompressionQueue.get(), [protectedThis = makeRefPtr(*this), strongBuffer = retainPtr(sampleBuffer), displaying] {
+        protectedThis->decodeSample(strongBuffer.get(), displaying);
     });
 }
 
@@ -238,11 +238,11 @@
     CMSampleBufferRef rawImageSampleBuffer = nullptr;
     if (noErr != CMSampleBufferCreateReadyWithImageBuffer(kCFAllocatorDefault, rawImageBuffer, imageBufferDescription.get(), &imageBufferTiming, &rawImageSampleBuffer))
         return;
-    RefPtr<WebCoreDecompressionSession> strongThis { this };
+    RefPtr<WebCoreDecompressionSession> protectedThis { this };
     RetainPtr<CMSampleBufferRef> imageSampleBuffer = adoptCF(rawImageSampleBuffer);
-    dispatch_async(m_enqueingQueue.get(), [strongThis, status, imageSampleBuffer, infoFlags, displaying] {
+    dispatch_async(m_enqueingQueue.get(), [protectedThis, status, imageSampleBuffer, infoFlags, displaying] {
         UNUSED_PARAM(infoFlags);
-        strongThis->enqueueDecodedSample(imageSampleBuffer.get(), displaying);
+        protectedThis->enqueueDecodedSample(imageSampleBuffer.get(), displaying);
     });
 }
 
@@ -314,8 +314,8 @@
     if (m_hasAvailableFrameCallback) {
         std::function<void()> callback { m_hasAvailableFrameCallback };
         m_hasAvailableFrameCallback = nullptr;
-        RefPtr<WebCoreDecompressionSession> strongThis { this };
-        dispatch_async(dispatch_get_main_queue(), [strongThis, callback] {
+        RefPtr<WebCoreDecompressionSession> protectedThis { this };
+        dispatch_async(dispatch_get_main_queue(), [protectedThis, callback] {
             callback();
         });
     }
@@ -333,10 +333,10 @@
     m_notificationCallback = notificationCallback;
 
     if (notificationCallback && isReadyForMoreMediaData()) {
-        RefPtr<WebCoreDecompressionSession> strongThis { this };
-        dispatch_async(dispatch_get_main_queue(), [strongThis] {
-            if (strongThis->m_notificationCallback)
-                strongThis->m_notificationCallback();
+        RefPtr<WebCoreDecompressionSession> protectedThis { this };
+        dispatch_async(dispatch_get_main_queue(), [protectedThis] {
+            if (protectedThis->m_notificationCallback)
+                protectedThis->m_notificationCallback();
         });
     }
 }
@@ -406,10 +406,10 @@
 
 void WebCoreDecompressionSession::flush()
 {
-    dispatch_sync(m_decompressionQueue.get(), [strongThis = RefPtr<WebCoreDecompressionSession>(this)] {
-        CMBufferQueueReset(strongThis->m_producerQueue.get());
-        dispatch_sync(strongThis->m_enqueingQueue.get(), [strongThis] {
-            CMBufferQueueReset(strongThis->m_consumerQueue.get());
+    dispatch_sync(m_decompressionQueue.get(), [protectedThis = RefPtr<WebCoreDecompressionSession>(this)] {
+        CMBufferQueueReset(protectedThis->m_producerQueue.get());
+        dispatch_sync(protectedThis->m_enqueingQueue.get(), [protectedThis] {
+            CMBufferQueueReset(protectedThis->m_consumerQueue.get());
         });
     });
 }

Modified: trunk/Source/WebKit2/ChangeLog (219456 => 219457)


--- trunk/Source/WebKit2/ChangeLog	2017-07-13 18:19:38 UTC (rev 219456)
+++ trunk/Source/WebKit2/ChangeLog	2017-07-13 18:21:33 UTC (rev 219457)
@@ -1,3 +1,18 @@
+2017-07-13  Jeremy Jones  <jere...@apple.com>
+
+        Style fix. Replace strongThis with protectedThis.
+        https://bugs.webkit.org/show_bug.cgi?id=174444
+
+        Reviewed by Eric Carlson.
+
+        Rename, no behavior change.
+
+        * WebProcess/cocoa/WebVideoFullscreenManager.mm:
+        (WebKit::WebVideoFullscreenManager::didSetupFullscreen):
+        (WebKit::WebVideoFullscreenManager::didEnterFullscreen):
+        (WebKit::WebVideoFullscreenManager::didExitFullscreen):
+        (WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
+
 2017-07-13  Chris Dumez  <cdu...@apple.com>
 
         Moved filesystem code out of WebResourceLoadStatisticsStore class

Modified: trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm (219456 => 219457)


--- trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm	2017-07-13 18:19:38 UTC (rev 219456)
+++ trunk/Source/WebKit2/WebProcess/cocoa/WebVideoFullscreenManager.mm	2017-07-13 18:21:33 UTC (rev 219457)
@@ -339,12 +339,12 @@
 
     interface->layerHostingContext()->setRootLayer(videoLayer);
 
-    RefPtr<WebVideoFullscreenManager> strongThis(this);
+    RefPtr<WebVideoFullscreenManager> protectedThis(this);
     
-    model->setVideoFullscreenLayer(videoLayer, [strongThis, this, contextId] {
-        dispatch_async(dispatch_get_main_queue(), [strongThis, this, contextId] {
-            if (strongThis->m_page)
-                m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), strongThis->m_page->pageID());
+    model->setVideoFullscreenLayer(videoLayer, [protectedThis, this, contextId] {
+        dispatch_async(dispatch_get_main_queue(), [protectedThis, this, contextId] {
+            if (protectedThis->m_page)
+                m_page->send(Messages::WebVideoFullscreenManagerProxy::EnterFullscreen(contextId), protectedThis->m_page->pageID());
         });
     });
     
@@ -368,10 +368,10 @@
         return;
 
     // exit fullscreen now if it was previously requested during an animation.
-    RefPtr<WebVideoFullscreenManager> strongThis(this);
-    dispatch_async(dispatch_get_main_queue(), [strongThis, videoElement] {
-        if (strongThis->m_page)
-            strongThis->exitVideoFullscreenForVideoElement(*videoElement);
+    RefPtr<WebVideoFullscreenManager> protectedThis(this);
+    dispatch_async(dispatch_get_main_queue(), [protectedThis, videoElement] {
+        if (protectedThis->m_page)
+            protectedThis->exitVideoFullscreenForVideoElement(*videoElement);
     });
 }
 
@@ -380,18 +380,18 @@
     RefPtr<WebVideoFullscreenModelVideoElement> model;
     RefPtr<WebVideoFullscreenInterfaceContext> interface;
     std::tie(model, interface) = ensureModelAndInterface(contextId);
-    RefPtr<WebVideoFullscreenManager> strongThis(this);
+    RefPtr<WebVideoFullscreenManager> protectedThis(this);
     
-    model->waitForPreparedForInlineThen([strongThis, contextId, interface, model] {
-        dispatch_async(dispatch_get_main_queue(), [strongThis, contextId, interface, model] {
-            model->setVideoFullscreenLayer(nil, [strongThis, contextId, interface] {
-                dispatch_async(dispatch_get_main_queue(), [strongThis, contextId, interface] {
+    model->waitForPreparedForInlineThen([protectedThis, contextId, interface, model] {
+        dispatch_async(dispatch_get_main_queue(), [protectedThis, contextId, interface, model] {
+            model->setVideoFullscreenLayer(nil, [protectedThis, contextId, interface] {
+                dispatch_async(dispatch_get_main_queue(), [protectedThis, contextId, interface] {
                     if (interface->layerHostingContext()) {
                         interface->layerHostingContext()->setRootLayer(nullptr);
                         interface->setLayerHostingContext(nullptr);
                     }
-                    if (strongThis->m_page)
-                        strongThis->m_page->send(Messages::WebVideoFullscreenManagerProxy::CleanupFullscreen(contextId), strongThis->m_page->pageID());
+                    if (protectedThis->m_page)
+                        protectedThis->m_page->send(Messages::WebVideoFullscreenManagerProxy::CleanupFullscreen(contextId), protectedThis->m_page->pageID());
                 });
             });
         });
@@ -418,10 +418,10 @@
     if (!videoElement || !targetIsFullscreen)
         return;
 
-    RefPtr<WebVideoFullscreenManager> strongThis(this);
-    dispatch_async(dispatch_get_main_queue(), [strongThis, videoElement, mode] {
-        if (strongThis->m_page)
-            strongThis->enterVideoFullscreenForVideoElement(*videoElement, mode);
+    RefPtr<WebVideoFullscreenManager> protectedThis(this);
+    dispatch_async(dispatch_get_main_queue(), [protectedThis, videoElement, mode] {
+        if (protectedThis->m_page)
+            protectedThis->enterVideoFullscreenForVideoElement(*videoElement, mode);
     });
 }
     
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to