Bug 990467 - Part 3: DOM: Re-order code to avoid multi-thread issue. r=hsinyi

This commit is contained in:
Szu-Yu Chen [:aknow] 2014-04-04 08:18:49 -04:00
parent 2d3ffc0fe8
commit 49fb08a3bf
2 changed files with 2 additions and 5 deletions

View File

@ -532,9 +532,6 @@ Telephony::CallStateChanged(uint32_t aServiceId, uint32_t aCallIndex,
bool aIsActive, bool aIsOutgoing, bool aIsEmergency,
bool aIsConference, bool aIsSwitchable, bool aIsMergeable)
{
NS_ASSERTION(aCallIndex != kOutgoingPlaceholderCallIndex,
"This should never happen!");
nsRefPtr<TelephonyCall> modifiedCall
= GetCallFromEverywhere(aServiceId, aCallIndex);

View File

@ -109,19 +109,19 @@ TelephonyCall::ChangeStateInternal(uint16_t aCallState, bool aFireEvents)
if (aCallState == nsITelephonyProvider::CALL_STATE_DISCONNECTED) {
NS_ASSERTION(mLive, "Should be live!");
mLive = false;
if (mGroup) {
mGroup->RemoveCall(this);
} else {
mTelephony->RemoveCall(this);
}
mLive = false;
} else if (!mLive) {
mLive = true;
if (mGroup) {
mGroup->AddCall(this);
} else {
mTelephony->AddCall(this);
}
mLive = true;
}
if (aFireEvents) {