Bug 1035394 - Fix dangerous public destructors in content/media/eme - r=cpearce

This commit is contained in:
Benoit Jacob 2014-07-08 17:23:17 -04:00
parent aafaf01cc6
commit cb214a5a12
3 changed files with 4 additions and 4 deletions

View File

@ -27,8 +27,8 @@ class MediaKeyMessageEvent MOZ_FINAL : public Event
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaKeyMessageEvent, Event)
virtual ~MediaKeyMessageEvent();
protected:
virtual ~MediaKeyMessageEvent();
MediaKeyMessageEvent(EventTarget* aOwner);
JS::Heap<JSObject*> mMessage;

View File

@ -27,8 +27,8 @@ class MediaKeyNeededEvent MOZ_FINAL : public Event
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(MediaKeyNeededEvent, Event)
virtual ~MediaKeyNeededEvent();
protected:
virtual ~MediaKeyNeededEvent();
MediaKeyNeededEvent(EventTarget* aOwner);
nsString mInitDataType;

View File

@ -43,8 +43,6 @@ public:
void Init(const nsAString& aSessionId);
~MediaKeySession();
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
// Mark this as resultNotAddRefed to return raw pointers
@ -77,6 +75,8 @@ public:
bool IsClosed() const;
private:
~MediaKeySession();
nsRefPtr<Promise> mClosed;
nsRefPtr<MediaKeyError> mMediaKeyError;