mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1035394 - Fix dangerous public destructors in content/media/webaudio - r=padenot
This commit is contained in:
parent
8997778c9d
commit
aafaf01cc6
@ -61,6 +61,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
~AnalyserNode() {}
|
||||
|
||||
private:
|
||||
friend class AnalyserNodeEngine;
|
||||
void AppendChunk(const AudioChunk& aChunk);
|
||||
|
@ -20,7 +20,6 @@ class AudioBufferSourceNode : public AudioNode,
|
||||
{
|
||||
public:
|
||||
explicit AudioBufferSourceNode(AudioContext* aContext);
|
||||
virtual ~AudioBufferSourceNode();
|
||||
|
||||
virtual void DestroyMediaStream() MOZ_OVERRIDE
|
||||
{
|
||||
@ -101,6 +100,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~AudioBufferSourceNode();
|
||||
|
||||
private:
|
||||
friend class AudioBufferSourceNodeEngine;
|
||||
// START is sent during Start().
|
||||
|
@ -318,6 +318,10 @@ AudioDestinationNode::AudioDestinationNode(AudioContext* aContext,
|
||||
}
|
||||
}
|
||||
|
||||
AudioDestinationNode::~AudioDestinationNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
AudioDestinationNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -83,6 +83,9 @@ public:
|
||||
|
||||
void InputMuted(bool aInputMuted);
|
||||
|
||||
protected:
|
||||
virtual ~AudioDestinationNode();
|
||||
|
||||
private:
|
||||
bool CheckAudioChannelPermissions(AudioChannel aValue);
|
||||
void CreateAudioChannelAgent();
|
||||
|
@ -31,6 +31,10 @@ AudioProcessingEvent::AudioProcessingEvent(ScriptProcessorNode* aOwner,
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
AudioProcessingEvent::~AudioProcessingEvent()
|
||||
{
|
||||
}
|
||||
|
||||
JSObject*
|
||||
AudioProcessingEvent::WrapObject(JSContext* aCx)
|
||||
{
|
||||
|
@ -63,6 +63,9 @@ public:
|
||||
return !!mOutputBuffer;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~AudioProcessingEvent();
|
||||
|
||||
private:
|
||||
already_AddRefed<AudioBuffer>
|
||||
LazilyCreateBuffer(uint32_t aNumberOfChannels, ErrorResult& rv);
|
||||
|
@ -258,6 +258,9 @@ BiquadFilterNode::BiquadFilterNode(AudioContext* aContext)
|
||||
engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
|
||||
}
|
||||
|
||||
BiquadFilterNode::~BiquadFilterNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
BiquadFilterNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
|
@ -64,6 +64,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~BiquadFilterNode();
|
||||
|
||||
private:
|
||||
static void SendFrequencyToStream(AudioNode* aNode);
|
||||
static void SendDetuneToStream(AudioNode* aNode);
|
||||
|
@ -77,6 +77,10 @@ ChannelMergerNode::ChannelMergerNode(AudioContext* aContext,
|
||||
MediaStreamGraph::INTERNAL_STREAM);
|
||||
}
|
||||
|
||||
ChannelMergerNode::~ChannelMergerNode()
|
||||
{
|
||||
}
|
||||
|
||||
JSObject*
|
||||
ChannelMergerNode::WrapObject(JSContext* aCx)
|
||||
{
|
||||
|
@ -36,6 +36,9 @@ public:
|
||||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~ChannelMergerNode();
|
||||
|
||||
private:
|
||||
const uint16_t mInputCount;
|
||||
};
|
||||
|
@ -64,6 +64,10 @@ ChannelSplitterNode::ChannelSplitterNode(AudioContext* aContext,
|
||||
MediaStreamGraph::INTERNAL_STREAM);
|
||||
}
|
||||
|
||||
ChannelSplitterNode::~ChannelSplitterNode()
|
||||
{
|
||||
}
|
||||
|
||||
JSObject*
|
||||
ChannelSplitterNode::WrapObject(JSContext* aCx)
|
||||
{
|
||||
|
@ -36,6 +36,9 @@ public:
|
||||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~ChannelSplitterNode();
|
||||
|
||||
private:
|
||||
const uint16_t mOutputCount;
|
||||
};
|
||||
|
@ -194,6 +194,10 @@ ConvolverNode::ConvolverNode(AudioContext* aContext)
|
||||
mStream = aContext->Graph()->CreateAudioNodeStream(engine, MediaStreamGraph::INTERNAL_STREAM);
|
||||
}
|
||||
|
||||
ConvolverNode::~ConvolverNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
ConvolverNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -62,6 +62,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~ConvolverNode();
|
||||
|
||||
private:
|
||||
nsRefPtr<AudioBuffer> mBuffer;
|
||||
bool mNormalize;
|
||||
|
@ -201,6 +201,10 @@ DelayNode::DelayNode(AudioContext* aContext, double aMaxDelay)
|
||||
engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
|
||||
}
|
||||
|
||||
DelayNode::~DelayNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
DelayNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -43,6 +43,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~DelayNode();
|
||||
|
||||
private:
|
||||
static void SendDelayToStream(AudioNode* aNode);
|
||||
friend class DelayNodeEngine;
|
||||
|
@ -222,6 +222,10 @@ DynamicsCompressorNode::DynamicsCompressorNode(AudioContext* aContext)
|
||||
engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
|
||||
}
|
||||
|
||||
DynamicsCompressorNode::~DynamicsCompressorNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
DynamicsCompressorNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -64,6 +64,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~DynamicsCompressorNode();
|
||||
|
||||
private:
|
||||
static void SendThresholdToStream(AudioNode* aNode);
|
||||
static void SendKneeToStream(AudioNode* aNode);
|
||||
|
@ -133,6 +133,10 @@ GainNode::GainNode(AudioContext* aContext)
|
||||
engine->SetSourceStream(static_cast<AudioNodeStream*> (mStream.get()));
|
||||
}
|
||||
|
||||
GainNode::~GainNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
GainNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -38,6 +38,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~GainNode();
|
||||
|
||||
private:
|
||||
static void SendGainToStream(AudioNode* aNode);
|
||||
|
||||
|
@ -86,6 +86,10 @@ MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode(AudioContext* a
|
||||
}
|
||||
}
|
||||
|
||||
MediaStreamAudioDestinationNode::~MediaStreamAudioDestinationNode()
|
||||
{
|
||||
}
|
||||
|
||||
size_t
|
||||
MediaStreamAudioDestinationNode::SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const
|
||||
{
|
||||
|
@ -42,6 +42,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~MediaStreamAudioDestinationNode();
|
||||
|
||||
private:
|
||||
nsRefPtr<DOMMediaStream> mDOMStream;
|
||||
nsRefPtr<MediaInputPort> mPort;
|
||||
|
@ -44,7 +44,6 @@ class MediaStreamAudioSourceNode : public AudioNode,
|
||||
{
|
||||
public:
|
||||
MediaStreamAudioSourceNode(AudioContext* aContext, DOMMediaStream* aMediaStream);
|
||||
virtual ~MediaStreamAudioSourceNode();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaStreamAudioSourceNode, AudioNode)
|
||||
@ -65,6 +64,9 @@ public:
|
||||
|
||||
virtual void PrincipalChanged(DOMMediaStream* aMediaStream) MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~MediaStreamAudioSourceNode();
|
||||
|
||||
private:
|
||||
nsRefPtr<MediaInputPort> mInputPort;
|
||||
nsRefPtr<DOMMediaStream> mInputStream;
|
||||
|
@ -28,6 +28,10 @@ OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(AudioContext* aOwner,
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent()
|
||||
{
|
||||
}
|
||||
|
||||
JSObject*
|
||||
OfflineAudioCompletionEvent::WrapObject(JSContext* aCx)
|
||||
{
|
||||
|
@ -39,6 +39,9 @@ public:
|
||||
return mRenderedBuffer;
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~OfflineAudioCompletionEvent();
|
||||
|
||||
private:
|
||||
nsRefPtr<AudioBuffer> mRenderedBuffer;
|
||||
};
|
||||
|
@ -23,7 +23,6 @@ class OscillatorNode : public AudioNode,
|
||||
{
|
||||
public:
|
||||
explicit OscillatorNode(AudioContext* aContext);
|
||||
virtual ~OscillatorNode();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(OscillatorNode, AudioNode)
|
||||
@ -89,6 +88,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~OscillatorNode();
|
||||
|
||||
private:
|
||||
static void SendFrequencyToStream(AudioNode* aNode);
|
||||
static void SendDetuneToStream(AudioNode* aNode);
|
||||
|
@ -27,8 +27,6 @@ class PannerNode : public AudioNode,
|
||||
public:
|
||||
MOZ_DECLARE_REFCOUNTED_TYPENAME(PannerNode)
|
||||
explicit PannerNode(AudioContext* aContext);
|
||||
virtual ~PannerNode();
|
||||
|
||||
|
||||
virtual JSObject* WrapObject(JSContext* aCx) MOZ_OVERRIDE;
|
||||
|
||||
@ -205,6 +203,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~PannerNode();
|
||||
|
||||
private:
|
||||
friend class AudioListener;
|
||||
friend class PannerNodeEngine;
|
||||
|
@ -23,7 +23,6 @@ public:
|
||||
uint32_t aBufferSize,
|
||||
uint32_t aNumberOfInputChannels,
|
||||
uint32_t aNumberOfOutputChannels);
|
||||
virtual ~ScriptProcessorNode();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
||||
@ -97,6 +96,9 @@ public:
|
||||
virtual size_t SizeOfExcludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
virtual size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const MOZ_OVERRIDE;
|
||||
|
||||
protected:
|
||||
virtual ~ScriptProcessorNode();
|
||||
|
||||
private:
|
||||
nsAutoPtr<SharedBuffers> mSharedBuffers;
|
||||
const uint32_t mBufferSize;
|
||||
|
@ -20,7 +20,6 @@ class WaveShaperNode : public AudioNode
|
||||
{
|
||||
public:
|
||||
explicit WaveShaperNode(AudioContext *aContext);
|
||||
virtual ~WaveShaperNode();
|
||||
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(WaveShaperNode, AudioNode)
|
||||
@ -59,6 +58,9 @@ public:
|
||||
return aMallocSizeOf(this) + SizeOfExcludingThis(aMallocSizeOf);
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual ~WaveShaperNode();
|
||||
|
||||
private:
|
||||
void ClearCurve();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user