mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1290028 - Remove the check for IsShutdown() from MediaDecoder::OwnerHasError(). r=gerald
MozReview-Commit-ID: Cg5UoFngxFr --HG-- extra : rebase_source : afece4f66454cf7b2c68ede4b5802fc445be96fa
This commit is contained in:
parent
64c1909e96
commit
32c54a1d7b
@ -86,7 +86,7 @@ public:
|
||||
|
||||
// Returns the owner of this decoder or null when the decoder is shutting
|
||||
// down. The owner should only be used on the main thread.
|
||||
virtual MediaDecoderOwner* GetOwner() = 0;
|
||||
virtual MediaDecoderOwner* GetOwner() const = 0;
|
||||
|
||||
// Set by Reader if the current audio track can be offloaded
|
||||
virtual void SetPlatformCanOffloadAudio(bool aCanOffloadAudio) {}
|
||||
|
@ -1064,7 +1064,8 @@ bool
|
||||
MediaDecoder::OwnerHasError() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
return IsShutdown() || mOwner->HasError();
|
||||
MOZ_ASSERT(!IsShutdown());
|
||||
return mOwner->HasError();
|
||||
}
|
||||
|
||||
class MediaElementGMPCrashHelper : public GMPCrashHelper
|
||||
@ -1831,7 +1832,7 @@ MediaMemoryTracker::CollectReports(nsIHandleReportCallback* aHandleReport,
|
||||
}
|
||||
|
||||
MediaDecoderOwner*
|
||||
MediaDecoder::GetOwner()
|
||||
MediaDecoder::GetOwner() const
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
// mOwner is valid until shutdown.
|
||||
|
@ -239,7 +239,7 @@ public:
|
||||
bool IsEndedOrShutdown() const;
|
||||
|
||||
// Return true if the MediaDecoderOwner's error attribute is not null.
|
||||
// If the MediaDecoder is shutting down, OwnerHasError will return true.
|
||||
// Must be called before Shutdown().
|
||||
bool OwnerHasError() const;
|
||||
|
||||
already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
|
||||
@ -434,7 +434,7 @@ private:
|
||||
// Indicate whether the media is same-origin with the element.
|
||||
void UpdateSameOriginStatus(bool aSameOrigin);
|
||||
|
||||
MediaDecoderOwner* GetOwner() override;
|
||||
MediaDecoderOwner* GetOwner() const override;
|
||||
|
||||
#ifdef MOZ_EME
|
||||
typedef MozPromise<RefPtr<CDMProxy>, bool /* aIgnored */, /* IsExclusive = */ true> CDMProxyPromise;
|
||||
|
@ -62,7 +62,7 @@ BufferDecoder::GetImageContainer()
|
||||
}
|
||||
|
||||
MediaDecoderOwner*
|
||||
BufferDecoder::GetOwner()
|
||||
BufferDecoder::GetOwner() const
|
||||
{
|
||||
// unknown
|
||||
return nullptr;
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
VideoFrameContainer* GetVideoFrameContainer() final override;
|
||||
layers::ImageContainer* GetImageContainer() final override;
|
||||
|
||||
MediaDecoderOwner* GetOwner() final override;
|
||||
MediaDecoderOwner* GetOwner() const final override;
|
||||
|
||||
already_AddRefed<GMPCrashHelper> GetCrashHelper() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user