Summary: | [RealtimeMediaSource] Revert back to using a WeakRef when deffering a task | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Claudio Saavedra <csaavedra> | ||||
Component: | Media | Assignee: | Thibault Saunier <tsaunier> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | pnormand, tsaunier, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Claudio Saavedra
2019-07-10 05:47:39 PDT
Created attachment 373872 [details]
Patch
Comment on attachment 373872 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=373872&action=review > Source/WebCore/platform/mediastream/RealtimeMediaSource.cpp:1041 > + callOnMainThread([weakThis = makeWeakPtr(*this), function = WTFMove(function)] { makeWeakPtr is not thread safe so we cannot do that. Even if makeWeakPtr was thread safe, if 'this' is being or about to be destroyed on the main thread, calling makeWeakPtr might not be a good idea anyway. I wonder why nothing is showing up in Mac bots. Looking at the crash log, it seems that it is a call to RealtimeMediaSource::notifySettingsDidChangeObservers that crashes. It should only be called on the main thread (there is a debug assert for that). I wonder then why the call to scheduleDeferredTask and the makeRef() would fail. Is this related with https://bugs.webkit.org/show_bug.cgi?id=194326 ? Fixed by https://bugs.webkit.org/show_bug.cgi?id=194326 - closing. |