Bug 939716 - Destructor for MediaStreamGraph should be virtual - r=roc

The destructor for MediaStreamGraph is non-virtual but it has a
derived class, MediaStreamGraphImpl, that overrides the destructor.
This destructor won't be called if an instance is deleted using a
pointer type of MediaStreamGraph.

It's unclear whether this actually happens but MediaStreamGraph.cpp
has code that creates a MediaStreamGraphImpl and returns it as a
MediaStreamGraph.

--HG--
extra : rebase_source : 9d006e5bf9bb056b5a54fc7aec159c26376c1459
This commit is contained in:
Chris Double 2013-11-19 02:09:47 +13:00
parent 6a658de601
commit 9e246ccf6b
2 changed files with 2 additions and 2 deletions

View File

@ -1057,7 +1057,7 @@ protected:
{
MOZ_COUNT_CTOR(MediaStreamGraph);
}
~MediaStreamGraph()
virtual ~MediaStreamGraph()
{
MOZ_COUNT_DTOR(MediaStreamGraph);
}

View File

@ -113,7 +113,7 @@ public:
* implement OfflineAudioContext. They do not support MediaStream inputs.
*/
explicit MediaStreamGraphImpl(bool aRealtime);
~MediaStreamGraphImpl();
virtual ~MediaStreamGraphImpl();
// Main thread only.
/**