зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1443429 - P4. Ensure MediaShutdownManager is initialized outside stable state. r=pehrsons
Differential Revision: https://phabricator.services.mozilla.com/D14283 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
03276c5356
Коммит
1eaf0bea3e
|
@ -35,6 +35,7 @@
|
|||
#include "MediaManager.h"
|
||||
#include "MediaMetadataManager.h"
|
||||
#include "MediaResource.h"
|
||||
#include "MediaShutdownManager.h"
|
||||
#include "MediaSourceDecoder.h"
|
||||
#include "MediaStreamError.h"
|
||||
#include "MediaStreamGraph.h"
|
||||
|
@ -3452,6 +3453,12 @@ HTMLMediaElement::HTMLMediaElement(
|
|||
RegisterActivityObserver();
|
||||
NotifyOwnerDocumentActivityChanged();
|
||||
|
||||
// We initialize the MediaShutdownManager as the HTMLMediaElement is always
|
||||
// constructed on the main thread, and not during stable state.
|
||||
// (MediaShutdownManager make use of nsIAsyncShutdownClient which is written
|
||||
// in JS)
|
||||
MediaShutdownManager::InitStatics();
|
||||
|
||||
mShutdownObserver->Subscribe(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,6 @@ MediaDecoder::MediaDecoder(MediaDecoderInit& aInit)
|
|||
mWatchManager.Watch(mIsAudioDataAudible,
|
||||
&MediaDecoder::NotifyAudibleStateChanged);
|
||||
|
||||
MediaShutdownManager::InitStatics();
|
||||
mVideoDecodingOberver->RegisterEvent();
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче