Bug 1409178 - Remove MediaDecoder::InitStatics() since it's a no-op. r?jwwang
MozReview-Commit-ID: Leo5wNaxpjg
--- a/dom/media/MediaDecoder.cpp
+++ b/dom/media/MediaDecoder.cpp
@@ -270,22 +270,16 @@ class MediaDecoder::BackgroundVideoDecod
NS_IMPL_ISUPPORTS(MediaDecoder::BackgroundVideoDecodingPermissionObserver, nsIObserver)
StaticRefPtr<MediaMemoryTracker> MediaMemoryTracker::sUniqueInstance;
LazyLogModule gMediaTimerLog("MediaTimer");
constexpr TimeUnit MediaDecoder::DEFAULT_NEXT_FRAME_AVAILABLE_BUFFERED;
-void
-MediaDecoder::InitStatics()
-{
- MOZ_ASSERT(NS_IsMainThread());
-}
-
NS_IMPL_ISUPPORTS(MediaMemoryTracker, nsIMemoryReporter)
void
MediaDecoder::NotifyOwnerActivityChanged(bool aIsDocumentVisible,
Visibility aElementVisibility,
bool aIsElementInTree)
{
MOZ_ASSERT(NS_IsMainThread());
--- a/dom/media/MediaDecoder.h
+++ b/dom/media/MediaDecoder.h
@@ -94,19 +94,16 @@ public:
PLAY_STATE_START,
PLAY_STATE_LOADING,
PLAY_STATE_PAUSED,
PLAY_STATE_PLAYING,
PLAY_STATE_ENDED,
PLAY_STATE_SHUTDOWN
};
- // Must be called exactly once, on the main thread, during startup.
- static void InitStatics();
-
explicit MediaDecoder(MediaDecoderInit& aInit);
// Returns the container content type of the resource.
// Safe to call from any thread.
const MediaContainerType& ContainerType() const { return mContainerType; }
// Cleanup internal data structures. Must be called on the main
// thread by the owning object before that object disposes of this object.
--- a/layout/build/nsLayoutStatics.cpp
+++ b/layout/build/nsLayoutStatics.cpp
@@ -111,17 +111,16 @@
#include "nsCookieService.h"
#include "nsApplicationCacheService.h"
#include "mozilla/dom/CustomElementRegistry.h"
#include "mozilla/dom/time/DateCacheCleaner.h"
#include "mozilla/EventDispatcher.h"
#include "mozilla/IMEStateManager.h"
#include "mozilla/dom/HTMLVideoElement.h"
#include "TouchManager.h"
-#include "MediaDecoder.h"
#include "MediaPrefs.h"
#include "mozilla/ServoBindings.h"
#include "mozilla/StaticPresData.h"
#include "mozilla/StylePrefs.h"
#include "mozilla/dom/WebIDLGlobalNameHash.h"
#include "mozilla/dom/ipc/IPCBlobInputStreamStorage.h"
#include "mozilla/dom/U2FTokenManager.h"
#include "mozilla/dom/PointerEventHandler.h"
@@ -291,18 +290,16 @@ nsLayoutStatics::Initialize()
ServiceWorkerRegistrar::Initialize();
#ifdef DEBUG
GeckoStyleContext::Initialize();
mozilla::LayerAnimationInfo::Initialize();
#endif
- MediaDecoder::InitStatics();
-
PromiseDebugging::Init();
mozilla::dom::WebCryptoThreadPool::Initialize();
#ifdef MOZ_STYLO
if (XRE_IsParentProcess() || XRE_IsContentProcess()) {
InitializeServo();
}