Title: [262334] trunk/Source/WebKit
Revision
262334
Author
[email protected]
Date
2020-05-29 20:27:16 -0700 (Fri, 29 May 2020)

Log Message

Replace callOnMainThread() with callOnMainRunLoop() in AudioSessionRoutingArbitratorProxyCocoa.mm
https://bugs.webkit.org/show_bug.cgi?id=212553

Reviewed by Chris Dumez.

Use callOnMainRunLoop() instead of callOnMainThread() in the UIProcess. Also move
m_setupArbitrationOngoing flag to the end of the completion handler.

No new tests, no functional change.

* UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
(WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (262333 => 262334)


--- trunk/Source/WebKit/ChangeLog	2020-05-30 02:10:07 UTC (rev 262333)
+++ trunk/Source/WebKit/ChangeLog	2020-05-30 03:27:16 UTC (rev 262334)
@@ -1,3 +1,18 @@
+2020-05-29  Peng Liu  <[email protected]>
+
+        Replace callOnMainThread() with callOnMainRunLoop() in AudioSessionRoutingArbitratorProxyCocoa.mm
+        https://bugs.webkit.org/show_bug.cgi?id=212553
+
+        Reviewed by Chris Dumez.
+
+        Use callOnMainRunLoop() instead of callOnMainThread() in the UIProcess. Also move
+        m_setupArbitrationOngoing flag to the end of the completion handler.
+
+        No new tests, no functional change.
+
+        * UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm:
+        (WebKit::SharedArbitrator::beginRoutingArbitrationForArbitrator):
+
 2020-05-29  Brent Fulgham  <[email protected]>
 
         [Cocoa] Improve logging quality for non-ephemeral sessions

Modified: trunk/Source/WebKit/UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm (262333 => 262334)


--- trunk/Source/WebKit/UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm	2020-05-30 02:10:07 UTC (rev 262333)
+++ trunk/Source/WebKit/UIProcess/Media/cocoa/AudioSessionRoutingArbitratorProxyCocoa.mm	2020-05-30 03:27:16 UTC (rev 262334)
@@ -113,8 +113,7 @@
     m_enqueuedCallbacks.append(WTFMove(callback));
 
     [[PAL::getAVAudioRoutingArbiterClass() sharedRoutingArbiter] beginArbitrationWithCategory:arbitrationCategory completionHandler:[this](BOOL defaultDeviceChanged, NSError * _Nullable error) {
-        callOnMainThread([this, defaultDeviceChanged, error = retainPtr(error)] {
-            m_setupArbitrationOngoing = false;
+        callOnMainRunLoop([this, defaultDeviceChanged, error = retainPtr(error)] {
             if (error)
                 RELEASE_LOG_ERROR(Media, "SharedArbitrator::beginRoutingArbitrationForArbitrator: %s failed with error %s:%s", convertEnumerationToString(*m_currentCategory).ascii().data(), [[error domain] UTF8String], [[error localizedDescription] UTF8String]);
 
@@ -125,6 +124,8 @@
             Vector<ArbitrationCallback> callbacks = WTFMove(m_enqueuedCallbacks);
             for (auto& callback : callbacks)
                 callback(error ? RoutingArbitrationError::Failed : RoutingArbitrationError::None, defaultDeviceChanged ? DefaultRouteChanged::Yes : DefaultRouteChanged::No);
+
+            m_setupArbitrationOngoing = false;
         });
     }];
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to