зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1366907 - Remove BufferDecoder's GMPCrashHelper. r=karlt
We no longer support decoding non-EME audio via GMPs, so it's not possible for a GMP to be used for decoding content that passes through a WebAudio BufferDecoder. So we don't need to keep the GMPCrashHelper around in the WebAudio code. If EME content is being used, there will be a crash helper on the MediaKeys object anyway. MozReview-Commit-ID: BThxnTANSTD --HG-- extra : rebase_source : 2c2ce4e982dcef6e3985c426386974083505c953
This commit is contained in:
Родитель
81b83a1f76
Коммит
1291d78800
|
@ -8,18 +8,15 @@
|
|||
|
||||
#include "nsISupports.h"
|
||||
#include "MediaResource.h"
|
||||
#include "GMPCrashHelper.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
NS_IMPL_ISUPPORTS0(BufferDecoder)
|
||||
|
||||
BufferDecoder::BufferDecoder(MediaResource* aResource,
|
||||
AbstractThread* aMainThread,
|
||||
GMPCrashHelper* aCrashHelper)
|
||||
AbstractThread* aMainThread)
|
||||
: mResource(aResource)
|
||||
, mAbstractMainThread(aMainThread)
|
||||
, mCrashHelper(aCrashHelper)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
|
@ -69,12 +66,6 @@ BufferDecoder::GetOwner() const
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
already_AddRefed<GMPCrashHelper>
|
||||
BufferDecoder::GetCrashHelper()
|
||||
{
|
||||
return do_AddRef(mCrashHelper);
|
||||
}
|
||||
|
||||
AbstractThread*
|
||||
BufferDecoder::AbstractMainThread() const
|
||||
{
|
||||
|
|
|
@ -25,8 +25,7 @@ public:
|
|||
// This class holds a weak pointer to MediaResource. It's the responsibility
|
||||
// of the caller to manage the memory of the MediaResource object.
|
||||
explicit BufferDecoder(MediaResource* aResource,
|
||||
AbstractThread* aMainThread,
|
||||
GMPCrashHelper* aCrashHelper);
|
||||
AbstractThread* aMainThread);
|
||||
|
||||
NS_DECL_THREADSAFE_ISUPPORTS
|
||||
|
||||
|
@ -42,8 +41,6 @@ public:
|
|||
|
||||
MediaDecoderOwner* GetOwner() const final override;
|
||||
|
||||
already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
|
||||
|
||||
AbstractThread* AbstractMainThread() const final override;
|
||||
|
||||
private:
|
||||
|
@ -51,7 +48,6 @@ private:
|
|||
RefPtr<TaskQueue> mTaskQueueIdentity;
|
||||
RefPtr<MediaResource> mResource;
|
||||
const RefPtr<AbstractThread> mAbstractMainThread;
|
||||
RefPtr<GMPCrashHelper> mCrashHelper;
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
#include "nsPrintfCString.h"
|
||||
#include "GMPCrashHelper.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
@ -166,24 +165,6 @@ MediaDecodeTask::Run()
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
class BufferDecoderGMPCrashHelper : public GMPCrashHelper
|
||||
{
|
||||
public:
|
||||
explicit BufferDecoderGMPCrashHelper(nsPIDOMWindowInner* aParent)
|
||||
: mParent(do_GetWeakReference(aParent))
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
}
|
||||
already_AddRefed<nsPIDOMWindowInner> GetPluginCrashedEventTarget() override
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryReferent(mParent);
|
||||
return window.forget();
|
||||
}
|
||||
private:
|
||||
nsWeakPtr mParent;
|
||||
};
|
||||
|
||||
bool
|
||||
MediaDecodeTask::CreateReader()
|
||||
{
|
||||
|
@ -205,8 +186,7 @@ MediaDecodeTask::CreateReader()
|
|||
MOZ_ASSERT(!mBufferDecoder);
|
||||
mMainThread =
|
||||
mDecodeJob.mContext->GetOwnerGlobal()->AbstractMainThreadFor(TaskCategory::Other);
|
||||
mBufferDecoder = new BufferDecoder(resource, mMainThread,
|
||||
new BufferDecoderGMPCrashHelper(parent));
|
||||
mBufferDecoder = new BufferDecoder(resource, mMainThread);
|
||||
|
||||
// If you change this list to add support for new decoders, please consider
|
||||
// updating HTMLMediaElement::CreateDecoder as well.
|
||||
|
|
Загрузка…
Ссылка в новой задаче