Skip to content
Permalink
Browse files
RealtimeMediaSource should be ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=181649

Patch by Youenn Fablet <youenn@apple.com> on 2018-01-15
Reviewed by Eric Carlson.

Difficult to write a test as this is really racy.
RealtimeIncomingVideoSourceCocoa::OnFrame is taking a reference on a background thread
to send a task to the main thread.
This requires it to be thread safe ref counted.

* platform/mediastream/RealtimeMediaSource.h:

Canonical link: https://commits.webkit.org/197503@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@226951 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
youennf authored and webkit-commit-queue committed Jan 15, 2018
1 parent 9a8a3f8 commit bfdb154e98d9be8bef3f4bfb4e668a3d4d7c077d
Showing with 16 additions and 2 deletions.
  1. +14 −0 Source/WebCore/ChangeLog
  2. +2 −2 Source/WebCore/platform/mediastream/RealtimeMediaSource.h
@@ -1,3 +1,17 @@
2018-01-15 Youenn Fablet <youenn@apple.com>

RealtimeMediaSource should be ThreadSafeRefCounted
https://bugs.webkit.org/show_bug.cgi?id=181649

Reviewed by Eric Carlson.

Difficult to write a test as this is really racy.
RealtimeIncomingVideoSourceCocoa::OnFrame is taking a reference on a background thread
to send a task to the main thread.
This requires it to be thread safe ref counted.

* platform/mediastream/RealtimeMediaSource.h:

2018-01-15 Philippe Normand <pnormand@igalia.com>

Prevent useless MediaPlayer mute state notifications
@@ -41,7 +41,7 @@
#include "MediaSample.h"
#include "PlatformLayer.h"
#include "RealtimeMediaSourceCapabilities.h"
#include <wtf/RefCounted.h>
#include <wtf/ThreadSafeRefCounted.h>
#include <wtf/Vector.h>
#include <wtf/WeakPtr.h>
#include <wtf/text/WTFString.h>
@@ -62,7 +62,7 @@ class RealtimeMediaSourceSettings;

struct CaptureSourceOrError;

class WEBCORE_EXPORT RealtimeMediaSource : public RefCounted<RealtimeMediaSource> {
class WEBCORE_EXPORT RealtimeMediaSource : public ThreadSafeRefCounted<RealtimeMediaSource> {
public:
class Observer {
public:

0 comments on commit bfdb154

Please sign in to comment.