mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-10 02:29:43 +00:00
#457: M1419363 + WeakPtr support from M1267918
This commit is contained in:
parent
f1e53a0c01
commit
ec2be8cb3f
|
@ -3110,11 +3110,13 @@ public:
|
||||||
{
|
{
|
||||||
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
|
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
|
||||||
|
|
||||||
|
if (MOZ_UNLIKELY(!mElement)) return; // bug 1419363
|
||||||
|
|
||||||
mElement->NotifyMediaStreamTracksAvailable(aStream);
|
mElement->NotifyMediaStreamTracksAvailable(aStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
HTMLMediaElement* mElement;
|
WeakPtr<HTMLMediaElement> mElement;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HTMLMediaElement::MediaStreamTrackListener :
|
class HTMLMediaElement::MediaStreamTrackListener :
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/dom/Promise.h"
|
#include "mozilla/dom/Promise.h"
|
||||||
#include "mozilla/dom/TextTrackManager.h"
|
#include "mozilla/dom/TextTrackManager.h"
|
||||||
|
#include "mozilla/WeakPtr.h"
|
||||||
#include "MediaDecoder.h"
|
#include "MediaDecoder.h"
|
||||||
#ifdef MOZ_EME
|
#ifdef MOZ_EME
|
||||||
#include "mozilla/dom/MediaKeys.h"
|
#include "mozilla/dom/MediaKeys.h"
|
||||||
|
@ -76,7 +77,8 @@ class HTMLMediaElement : public nsGenericHTMLElement,
|
||||||
public nsIDOMHTMLMediaElement,
|
public nsIDOMHTMLMediaElement,
|
||||||
public nsIObserver,
|
public nsIObserver,
|
||||||
public MediaDecoderOwner,
|
public MediaDecoderOwner,
|
||||||
public nsIAudioChannelAgentCallback
|
public nsIAudioChannelAgentCallback,
|
||||||
|
public SupportsWeakPtr<HTMLMediaElement>
|
||||||
{
|
{
|
||||||
friend AutoNotifyAudioChannelAgent;
|
friend AutoNotifyAudioChannelAgent;
|
||||||
|
|
||||||
|
@ -89,6 +91,8 @@ public:
|
||||||
typedef mozilla::MediaDecoderOwner MediaDecoderOwner;
|
typedef mozilla::MediaDecoderOwner MediaDecoderOwner;
|
||||||
typedef mozilla::MetadataTags MetadataTags;
|
typedef mozilla::MetadataTags MetadataTags;
|
||||||
|
|
||||||
|
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(HTMLMediaElement)
|
||||||
|
|
||||||
CORSMode GetCORSMode() {
|
CORSMode GetCORSMode() {
|
||||||
return mCORSMode;
|
return mCORSMode;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user