Title: [247590] branches/safari-608-branch/Source/WebCore
Revision
247590
Author
kocsen_ch...@apple.com
Date
2019-07-18 13:23:44 -0700 (Thu, 18 Jul 2019)

Log Message

Cherry-pick r247480. rdar://problem/53229746

    Hop to main thread for release logging in RealtimeIncomingAudioSource
    https://bugs.webkit.org/show_bug.cgi?id=199813

    Reviewed by Eric Carlson.

    LoggerHelper routines allow logging messages in system console and inspector console.
    These routines iterate through a Vector of log observers which is not thread safe.
    Document, the main log observer, also expects to be called on the main thread.
    Manually tested (writing a layout test for this would require more than 2 seconds).

    * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
    (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):

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

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebCore/ChangeLog (247589 => 247590)


--- branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:41 UTC (rev 247589)
+++ branches/safari-608-branch/Source/WebCore/ChangeLog	2019-07-18 20:23:44 UTC (rev 247590)
@@ -1,5 +1,40 @@
 2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
 
+        Cherry-pick r247480. rdar://problem/53229746
+
+    Hop to main thread for release logging in RealtimeIncomingAudioSource
+    https://bugs.webkit.org/show_bug.cgi?id=199813
+    
+    Reviewed by Eric Carlson.
+    
+    LoggerHelper routines allow logging messages in system console and inspector console.
+    These routines iterate through a Vector of log observers which is not thread safe.
+    Document, the main log observer, also expects to be called on the main thread.
+    Manually tested (writing a layout test for this would require more than 2 seconds).
+    
+    * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
+    (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@247480 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-07-16  Youenn Fablet  <you...@apple.com>
+
+            Hop to main thread for release logging in RealtimeIncomingAudioSource
+            https://bugs.webkit.org/show_bug.cgi?id=199813
+
+            Reviewed by Eric Carlson.
+
+            LoggerHelper routines allow logging messages in system console and inspector console.
+            These routines iterate through a Vector of log observers which is not thread safe.
+            Document, the main log observer, also expects to be called on the main thread.
+            Manually tested (writing a layout test for this would require more than 2 seconds).
+
+            * platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp:
+            (WebCore::RealtimeIncomingAudioSourceCocoa::OnData):
+
+2019-07-17  Kocsen Chung  <kocsen_ch...@apple.com>
+
         Cherry-pick r247470. rdar://problem/53229634
 
     outlook.live.com has odd viewport with edge gap

Modified: branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp (247589 => 247590)


--- branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp	2019-07-18 20:23:41 UTC (rev 247589)
+++ branches/safari-608-branch/Source/WebCore/platform/mediastream/mac/RealtimeIncomingAudioSourceCocoa.cpp	2019-07-18 20:23:44 UTC (rev 247590)
@@ -87,8 +87,11 @@
         memcpy(audioBufferList.buffer(0)->mData, audioData, audioBufferList.buffer(0)->mDataByteSize);
 
 #if !RELEASE_LOG_DISABLED
-    if (!(++m_chunksReceived % 200))
-        ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "chunk ", m_chunksReceived);
+    if (!(++m_chunksReceived % 200)) {
+        callOnMainThread([this, protectedThis = makeRef(*this)] {
+            ALWAYS_LOG_IF(loggerPtr(), LOGIDENTIFIER, "chunk ", m_chunksReceived);
+        });
+    }
 #endif
 
     audioSamplesAvailable(mediaTime, audioBufferList, CAAudioStreamDescription(newDescription), numberOfFrames);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to