RESOLVED FIXED 187402
Make RealtimeOutgoingVideoSource use DestructionThread::Main
https://bugs.webkit.org/show_bug.cgi?id=187402
Summary Make RealtimeOutgoingVideoSource use DestructionThread::Main
youenn fablet
Reported 2018-07-06 12:45:39 PDT
Make RealtimeOutgoingVideoSource use DestructionThread::Main
Attachments
Patch (2.18 KB, patch)
2018-07-06 12:49 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-07-06 12:49:48 PDT
Chris Dumez
Comment 2 2018-07-06 12:57:41 PDT
Comment on attachment 344442 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=344442&action=review > Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h:57 > + auto result = hasOneRef() ? rtc::RefCountReleaseStatus::kDroppedLastRef : rtc::RefCountReleaseStatus::kOtherRefsRemained; Is this thread safe? If Release() can be called from various threads, then a ref() / deref() can happen on another thread after your hasOneRef() check.
youenn fablet
Comment 3 2018-07-06 13:02:22 PDT
> View in context: > https://bugs.webkit.org/attachment.cgi?id=344442&action=review > > > Source/WebCore/platform/mediastream/RealtimeOutgoingVideoSource.h:57 > > + auto result = hasOneRef() ? rtc::RefCountReleaseStatus::kDroppedLastRef : rtc::RefCountReleaseStatus::kOtherRefsRemained; > > Is this thread safe? If Release() can be called from various threads, then a > ref() / deref() can happen on another thread after your hasOneRef() check. Well, this whole API is not really thread safe but we need to return something as an API contract. Even if we return the true value at the time we did defer(), it will be useless for the caller, except maybe for logging. I am fine continuing returning rtc::RefCountReleaseStatus::kOtherRefsRemained like done before.
WebKit Commit Bot
Comment 4 2018-07-06 16:30:28 PDT
Comment on attachment 344442 [details] Patch Clearing flags on attachment: 344442 Committed r233602: <https://trac.webkit.org/changeset/233602>
WebKit Commit Bot
Comment 5 2018-07-06 16:30:30 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 6 2018-07-06 16:45:04 PDT
Note You need to log in before you can comment on or make changes to this bug.