mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1741118 - Don't release GmpPlugin MediaEvents, which hold on to the call thread, on the call thread. r=ng
Since bug 1727262 these are fine to release off-target. Differential Revision: https://phabricator.services.mozilla.com/D132222
This commit is contained in:
parent
a3bf3e72b1
commit
b989c39bda
@ -26,13 +26,8 @@ class GmpPluginNotifier : public GmpPluginNotifierInterface {
|
||||
new MediaEventForwarder<uint64_t>(mOwningThread)) {}
|
||||
|
||||
~GmpPluginNotifier() {
|
||||
mOwningThread->Dispatch(NS_NewRunnableFunction(
|
||||
"~GmpPluginNotifier",
|
||||
[createdEvent = std::move(mCreatedGmpPluginEvent),
|
||||
releasedEvent = std::move(mReleasedGmpPluginEvent)]() mutable {
|
||||
createdEvent->DisconnectAll();
|
||||
releasedEvent->DisconnectAll();
|
||||
}));
|
||||
mCreatedGmpPluginEvent->DisconnectAll();
|
||||
mReleasedGmpPluginEvent->DisconnectAll();
|
||||
}
|
||||
|
||||
MediaEventSource<uint64_t>& CreatedGmpPluginEvent() override {
|
||||
@ -47,8 +42,8 @@ class GmpPluginNotifier : public GmpPluginNotifierInterface {
|
||||
|
||||
protected:
|
||||
const nsCOMPtr<nsISerialEventTarget> mOwningThread;
|
||||
RefPtr<MediaEventForwarder<uint64_t> > mCreatedGmpPluginEvent;
|
||||
RefPtr<MediaEventForwarder<uint64_t> > mReleasedGmpPluginEvent;
|
||||
RefPtr<MediaEventForwarder<uint64_t>> mCreatedGmpPluginEvent;
|
||||
RefPtr<MediaEventForwarder<uint64_t>> mReleasedGmpPluginEvent;
|
||||
};
|
||||
|
||||
class WebrtcVideoDecoderFactory : public GmpPluginNotifier,
|
||||
|
Loading…
x
Reference in New Issue
Block a user