Skip to content

Commit

Permalink
RealtimeMediaSource should be ThreadSafeRefCounted
Browse files Browse the repository at this point in the history
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 bfdb154
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 14 additions & 0 deletions Source/WebCore/ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/platform/mediastream/RealtimeMediaSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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:
Expand Down

0 comments on commit bfdb154

Please sign in to comment.