Bug 979626 - Crash in Telephony while running stability scripts. r=vicamo

This commit is contained in:
Hsin-Yi Tsai 2014-03-05 20:19:38 +08:00
parent 4164cd3490
commit ac1bf381e1

View File

@ -202,12 +202,6 @@ Telephony::Create(nsPIDOMWindow* aOwner, ErrorResult& aRv)
return nullptr;
}
rv = ril->RegisterListener(telephony->mListener);
if (NS_FAILED(rv)) {
aRv.Throw(rv);
return nullptr;
}
return telephony.forget();
}
@ -635,6 +629,10 @@ Telephony::EnumerateCallStateComplete()
if (NS_FAILED(NotifyCallsChanged(nullptr))) {
NS_WARNING("Failed to notify calls changed!");
}
if (NS_FAILED(mProvider->RegisterListener(mListener))) {
NS_WARNING("Failed to register listener!");
}
return NS_OK;
}