Title: [279577] trunk/Source/WebKit
- Revision
- 279577
- Author
- [email protected]
- Date
- 2021-07-06 00:54:22 -0700 (Tue, 06 Jul 2021)
Log Message
UserMediaCaptureManagerProxy::SourceProxy destructor should remove itself as observer before invalidating its ring buffer storage
https://bugs.webkit.org/show_bug.cgi?id=227683
Reviewed by Eric Carlson.
Covered by existing tests.
* UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
(WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy):
Previously, we were invalidating the ring buffer storage before removing the source proxy as audio observer.
This created the risk for the ring buffer to be recreated before the end of SourceProxy destructor.
To fix this, we invalidate the storage just after stopping observing.
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (279576 => 279577)
--- trunk/Source/WebKit/ChangeLog 2021-07-06 07:48:10 UTC (rev 279576)
+++ trunk/Source/WebKit/ChangeLog 2021-07-06 07:54:22 UTC (rev 279577)
@@ -1,3 +1,18 @@
+2021-07-06 Youenn Fablet <[email protected]>
+
+ UserMediaCaptureManagerProxy::SourceProxy destructor should remove itself as observer before invalidating its ring buffer storage
+ https://bugs.webkit.org/show_bug.cgi?id=227683
+
+ Reviewed by Eric Carlson.
+
+ Covered by existing tests.
+
+ * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp:
+ (WebKit::UserMediaCaptureManagerProxy::SourceProxy::~SourceProxy):
+ Previously, we were invalidating the ring buffer storage before removing the source proxy as audio observer.
+ This created the risk for the ring buffer to be recreated before the end of SourceProxy destructor.
+ To fix this, we invalidate the storage just after stopping observing.
+
2021-07-05 Alexander Mikhaylenko <[email protected]>
[GTK] Navigation swipe gesture can be triggered with mouse
Modified: trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (279576 => 279577)
--- trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp 2021-07-06 07:48:10 UTC (rev 279576)
+++ trunk/Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp 2021-07-06 07:54:22 UTC (rev 279577)
@@ -80,9 +80,6 @@
// Make sure the rendering thread is stopped before we proceed with the destruction.
stop();
- if (m_ringBuffer)
- static_cast<SharedRingBufferStorage&>(m_ringBuffer->storage()).invalidate();
-
switch (m_source->type()) {
case RealtimeMediaSource::Type::Audio:
m_source->removeAudioSampleObserver(*this);
@@ -94,6 +91,9 @@
ASSERT_NOT_REACHED();
}
m_source->removeObserver(*this);
+
+ if (m_ringBuffer)
+ static_cast<SharedRingBufferStorage&>(m_ringBuffer->storage()).invalidate();
}
RealtimeMediaSource& source() { return m_source; }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes