Backed out changeset 5dd9fb34f542 (bug 1096078) for Windows mochitest-3 crashes. a=me

This commit is contained in:
Ryan VanderMeulen 2014-11-13 15:24:49 -05:00
parent d9de42ef04
commit 8bf330a688

View File

@ -107,7 +107,10 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(DOMMediaStream)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(DOMMediaStream,
DOMEventTargetHelper)
tmp->Destroy();
if (tmp->mListener) {
// Make sure |mListener| cannot call back after |mTracks| is collected
tmp->mListener->Forget();
}
NS_IMPL_CYCLE_COLLECTION_UNLINK(mWindow)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mTracks)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mConsumersToKeepAlive)