Commit 49fb08a3 authored by Szu-Yu Chen [:aknow]'s avatar Szu-Yu Chen [:aknow]
Browse files

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

parent 2d3ffc0f
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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);

+2 −2
Original line number Diff line number Diff line
@@ -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) {