bug 859646 - fix b2g code that checks what infallible TArray::EnsureLengthAtleast() returns r=jlebar

This commit is contained in:
Trevor Saunders 2013-04-08 23:35:56 -04:00
parent ec26428656
commit c318b7cf14

View File

@ -480,10 +480,7 @@ SystemWorkerManager::RegisterRilWorker(unsigned int aClientId,
{ {
NS_ENSURE_TRUE(!JSVAL_IS_PRIMITIVE(aWorker), NS_ERROR_UNEXPECTED); NS_ENSURE_TRUE(!JSVAL_IS_PRIMITIVE(aWorker), NS_ERROR_UNEXPECTED);
if (!mRilConsumers.EnsureLengthAtLeast(aClientId + 1)) { mRilConsumers.EnsureLengthAtLeast(aClientId + 1);
NS_WARNING("Failed to ensure minimum length of mRilConsumers");
return NS_ERROR_FAILURE;
}
if (mRilConsumers[aClientId]) { if (mRilConsumers[aClientId]) {
NS_WARNING("RilConsumer already registered"); NS_WARNING("RilConsumer already registered");