Bug 1027251 - Fix or whitelist dangerous public destructors in content/media - r=cpearce

This commit is contained in:
Benoit Jacob 2014-06-20 07:08:24 -04:00
Родитель 117676ec6f
Коммит 59535f575b
4 изменённых файлов: 19 добавлений и 3 удалений

Просмотреть файл

@ -193,6 +193,8 @@ class AudioInitTask;
// is thread-safe without external synchronization.
class AudioStream MOZ_FINAL
{
virtual ~AudioStream();
public:
// Initialize Audio Library. Some Audio backends require initializing the
// library before using it.
@ -214,7 +216,6 @@ public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AudioStream)
AudioStream();
virtual ~AudioStream();
enum LatencyRequest {
HighLatency,

Просмотреть файл

@ -19,6 +19,13 @@ class TimeRanges;
}
class RequestSampleCallback;
class MediaDecoderReader;
template <>
struct HasDangerousPublicDestructor<MediaDecoderReader>
{
static const bool value = true;
};
// Encapsulates the decoding and reading of media data. Reading can either
// synchronous and done on the calling "decode" thread, or asynchronous and
@ -28,7 +35,6 @@ class RequestSampleCallback;
// be accessed on the decode task queue.
class MediaDecoderReader {
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(MediaDecoderReader)
MediaDecoderReader(AbstractMediaDecoder* aDecoder);
@ -269,6 +275,7 @@ public:
// Called during shutdown to break any reference cycles.
virtual void BreakCycles() = 0;
protected:
virtual ~RequestSampleCallback() {}
};

Просмотреть файл

@ -36,6 +36,13 @@ class nsIPrincipal;
namespace mozilla {
class MediaDecoder;
class MediaChannelStatistics;
template<>
struct HasDangerousPublicDestructor<MediaChannelStatistics>
{
static const bool value = true;
};
/**
* This class is useful for estimating rates of data passing through

Просмотреть файл

@ -34,6 +34,8 @@ class ImageContainer;
* confusing.
*/
class VideoFrameContainer {
~VideoFrameContainer();
public:
typedef layers::ImageContainer ImageContainer;
typedef layers::Image Image;
@ -42,7 +44,6 @@ public:
VideoFrameContainer(dom::HTMLMediaElement* aElement,
already_AddRefed<ImageContainer> aContainer);
~VideoFrameContainer();
// Call on any thread
void SetCurrentFrame(const gfxIntSize& aIntrinsicSize, Image* aImage,