Title: [235732] trunk/Source/WebCore
- Revision
- 235732
- Author
- [email protected]
- Date
- 2018-09-06 03:50:41 -0700 (Thu, 06 Sep 2018)
Log Message
[GStreamer] Extra ASSERTs at MainThreadNotifier
https://bugs.webkit.org/show_bug.cgi?id=188786
Reviewed by Carlos Garcia Campos.
We add a couple of checks in debug mode: there is only one bit on
per notification and ensure a notifier was invalidated before
being destroyed.
* platform/graphics/gstreamer/MainThreadNotifier.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (235731 => 235732)
--- trunk/Source/WebCore/ChangeLog 2018-09-06 09:36:52 UTC (rev 235731)
+++ trunk/Source/WebCore/ChangeLog 2018-09-06 10:50:41 UTC (rev 235732)
@@ -1,3 +1,16 @@
+2018-09-06 Xabier Rodriguez Calvar <[email protected]>
+
+ [GStreamer] Extra ASSERTs at MainThreadNotifier
+ https://bugs.webkit.org/show_bug.cgi?id=188786
+
+ Reviewed by Carlos Garcia Campos.
+
+ We add a couple of checks in debug mode: there is only one bit on
+ per notification and ensure a notifier was invalidated before
+ being destroyed.
+
+ * platform/graphics/gstreamer/MainThreadNotifier.h:
+
2018-09-05 Youenn Fablet <[email protected]>
Move ownership of outgoing source to RTCRtpSender backend
Modified: trunk/Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h (235731 => 235732)
--- trunk/Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h 2018-09-06 09:36:52 UTC (rev 235731)
+++ trunk/Source/WebCore/platform/graphics/gstreamer/MainThreadNotifier.h 2018-09-06 10:50:41 UTC (rev 235732)
@@ -35,10 +35,17 @@
return adoptRef(*new MainThreadNotifier());
}
+ ~MainThreadNotifier()
+ {
+ ASSERT(!m_isValid.load());
+ }
+
template<typename F>
void notify(T notificationType, F&& callbackFunctor)
{
ASSERT(m_isValid.load());
+ // Assert that there is only one bit on at a time.
+ ASSERT(!(static_cast<int>(notificationType) & (static_cast<int>(notificationType) - 1)));
if (isMainThread()) {
removePendingNotification(notificationType);
callbackFunctor();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes