Title: [295588] trunk/Source/WebCore/Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp
- Revision
- 295588
- Author
- [email protected]
- Date
- 2022-06-16 00:20:47 -0700 (Thu, 16 Jun 2022)
Log Message
TestWebKitAPI.WebKit2.SpeechRecognitionErrorWhenStartingAudioCaptureOnDifferentPageE is a flaky crash
https://bugs.webkit.org/show_bug.cgi?id=239474
Reviewed by Sihui Liu.
At least when using MockAudioSharedInternalUnit the call to RealtimeMediaSource::start can call code on another thread
that assumes that RealtimeMediaSource::setLogger has already been called. This can be made to crash almost 100% of the time
in the test by adding WTFReportBacktrace at the beginning of RealtimeMediaSource::setLogger which delays when m_logger is set
enough for the "MockAudioSharedInternalUnit Capture Queue" thread to read from m_logger before it is written without this change.
* Source/WebCore/Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp:
(WebCore::SpeechRecognitionCaptureSourceImpl::SpeechRecognitionCaptureSourceImpl):
Canonical link: https://commits.webkit.org/251593@main
Modified Paths
Diff
Modified: trunk/Source/WebCore/Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp (295587 => 295588)
--- trunk/Source/WebCore/Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp 2022-06-16 06:04:36 UTC (rev 295587)
+++ trunk/Source/WebCore/Modules/speech/SpeechRecognitionCaptureSourceImpl.cpp 2022-06-16 07:20:47 UTC (rev 295588)
@@ -57,10 +57,6 @@
, m_stateUpdateCallback(WTFMove(stateUpdateCallback))
, m_source(WTFMove(source))
{
- m_source->addAudioSampleObserver(*this);
- m_source->addObserver(*this);
- m_source->start();
-
#if !RELEASE_LOG_DISABLED
if (!nullLogger().get()) {
nullLogger() = Logger::create(this);
@@ -70,6 +66,10 @@
m_source->setLogger(*nullLogger(), nextLogIdentifier());
#endif
+ m_source->addAudioSampleObserver(*this);
+ m_source->addObserver(*this);
+ m_source->start();
+
initializeWeakPtrFactory();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes