Bug 952893 - Null-check mStream in AudioDestinationNode::SetIsOnlyNodeForContext as it can be called during CC, on a CLOSED TREE.

--HG--
extra : rebase_source : 20893fd4bba9a92c71a3e205e58dc03e6f2958dd
This commit is contained in:
Paul Adenot 2014-01-29 19:09:39 +01:00
parent 9f00e88345
commit dca90b3409

View File

@ -531,7 +531,9 @@ AudioDestinationNode::SetIsOnlyNodeForContext(bool aIsOnlyNode)
}
if (aIsOnlyNode) {
mStream->ChangeExplicitBlockerCount(1);
if (mStream) {
mStream->ChangeExplicitBlockerCount(1);
}
mStartedBlockingDueToBeingOnlyNode = TimeStamp::Now();
mExtraCurrentTimeSinceLastStartedBlocking = 0;
// Don't do an update of mExtraCurrentTimeSinceLastStartedBlocking until the next stable state.
@ -541,7 +543,9 @@ AudioDestinationNode::SetIsOnlyNodeForContext(bool aIsOnlyNode)
// Force update of mExtraCurrentTimeSinceLastStartedBlocking if necessary
ExtraCurrentTime();
mExtraCurrentTime += mExtraCurrentTimeSinceLastStartedBlocking;
mStream->ChangeExplicitBlockerCount(-1);
if (mStream) {
mStream->ChangeExplicitBlockerCount(-1);
}
mStartedBlockingDueToBeingOnlyNode = TimeStamp();
}
}