Backout 15c4d6334107 (bug 790854) for test failures
authorRobert O'Callahan <robert@ocallahan.org>
Fri, 26 Oct 2012 12:08:38 +1300
changeset 111590 988a9fdc129475216452723808aa2b0f3c6c2b8f
parent 111589 589b6766b99a4ba4674035201376f35fde602334
child 111591 cad381167be7f62ce2c9c6010b976ab5b6590198
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
bugs790854
milestone19.0a1
backs out15c4d6334107a7874e84e248440fd057e148381f
Backout 15c4d6334107 (bug 790854) for test failures
content/media/MediaStreamGraph.cpp
--- a/content/media/MediaStreamGraph.cpp
+++ b/content/media/MediaStreamGraph.cpp
@@ -1793,19 +1793,18 @@ MediaStream::Destroy()
     {
       mStream->DestroyImpl();
       mStream->GraphImpl()->RemoveStream(mStream);
     }
     virtual void RunDuringShutdown()
     { Run(); }
   };
   mWrapper = nullptr;
+  GraphImpl()->AppendMessage(new Message(this));
   mMainThreadDestroyed = true;
-  GraphImpl()->AppendMessage(new Message(this));
-  // 'this' can be dead after the AppendMessage, so don't touch it here.
 }
 
 void
 MediaStream::AddAudioOutput(void* aKey)
 {
   class Message : public ControlMessage {
   public:
     Message(MediaStream* aStream, void* aKey) : ControlMessage(aStream), mKey(aKey) {}