mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-01-12 20:30:18 +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.");
|
||||
|
||||
if (MOZ_UNLIKELY(!mElement)) return; // bug 1419363
|
||||
|
||||
mElement->NotifyMediaStreamTracksAvailable(aStream);
|
||||
}
|
||||
|
||||
private:
|
||||
HTMLMediaElement* mElement;
|
||||
WeakPtr<HTMLMediaElement> mElement;
|
||||
};
|
||||
|
||||
class HTMLMediaElement::MediaStreamTrackListener :
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/dom/Promise.h"
|
||||
#include "mozilla/dom/TextTrackManager.h"
|
||||
#include "mozilla/WeakPtr.h"
|
||||
#include "MediaDecoder.h"
|
||||
#ifdef MOZ_EME
|
||||
#include "mozilla/dom/MediaKeys.h"
|
||||
@ -76,7 +77,8 @@ class HTMLMediaElement : public nsGenericHTMLElement,
|
||||
public nsIDOMHTMLMediaElement,
|
||||
public nsIObserver,
|
||||
public MediaDecoderOwner,
|
||||
public nsIAudioChannelAgentCallback
|
||||
public nsIAudioChannelAgentCallback,
|
||||
public SupportsWeakPtr<HTMLMediaElement>
|
||||
{
|
||||
friend AutoNotifyAudioChannelAgent;
|
||||
|
||||
@ -89,6 +91,8 @@ public:
|
||||
typedef mozilla::MediaDecoderOwner MediaDecoderOwner;
|
||||
typedef mozilla::MetadataTags MetadataTags;
|
||||
|
||||
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(HTMLMediaElement)
|
||||
|
||||
CORSMode GetCORSMode() {
|
||||
return mCORSMode;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user