mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #2452 - Don't use WebVTTListener, JS wrapper, MediaShutdownManager in stable state
https://bugzilla.mozilla.org/show_bug.cgi?id=1443429 https://bugzilla.mozilla.org/show_bug.cgi?id=1515021
This commit is contained in:
parent
458f5eb385
commit
fbd829908e
7 changed files with 77 additions and 38 deletions
|
|
@ -53,6 +53,7 @@
|
|||
#include "MediaDecoder.h"
|
||||
#include "MediaPrefs.h"
|
||||
#include "MediaResource.h"
|
||||
#include "MediaShutdownManager.h"
|
||||
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIContentPolicy.h"
|
||||
|
|
@ -3217,6 +3218,13 @@ HTMLMediaElement::HTMLMediaElement(already_AddRefed<mozilla::dom::NodeInfo>& aNo
|
|||
NotifyOwnerDocumentActivityChanged();
|
||||
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
|
||||
// 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();
|
||||
|
||||
mWatchManager.Watch(mDownloadSuspendedByCache, &HTMLMediaElement::UpdateReadyStateInternal);
|
||||
// Paradoxically, there is a self-edge whereby UpdateReadyStateInternal refuses
|
||||
// to run until mReadyState reaches at least HAVE_METADATA by some other means.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue