/* static */ already_AddRefed<PlatformDecoderModule> PlatformDecoderModule::Create() { // Note: This (usually) runs on the decode thread. RefPtr<PlatformDecoderModule> m(CreatePDM()); if (m && NS_SUCCEEDED(m->Startup())) { return m.forget(); } return CreateAgnosticDecoderModule(); }
/* static */ already_AddRefed<PlatformDecoderModule> PlatformDecoderModule::Create() { // Note: This runs on the decode thread. MOZ_ASSERT(!NS_IsMainThread()); nsRefPtr<PlatformDecoderModule> m(CreatePDM()); if (m && NS_SUCCEEDED(m->Startup())) { return m.forget(); } return nullptr; }