Bug 990290 - Null-check AudioNode's mContext during unlink. r=ehsan

Unlink can happen twice, apparently.
This commit is contained in:
Bobby Holley 2014-04-11 07:59:47 -07:00
parent 2c9355e7c3
commit 9ecf305fd1

View File

@ -19,7 +19,9 @@ NS_IMPL_CYCLE_COLLECTION_CLASS(AudioNode)
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AudioNode, DOMEventTargetHelper)
tmp->DisconnectFromGraph();
tmp->mContext->UpdateNodeCount(-1);
if (tmp->mContext) {
tmp->mContext->UpdateNodeCount(-1);
}
NS_IMPL_CYCLE_COLLECTION_UNLINK(mContext)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputNodes)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mOutputParams)