bug 856700 - don't check the result of infalible nsTArray::SwapElements() in dom/ r=khuey

This commit is contained in:
Trevor Saunders 2013-04-01 13:35:13 -04:00
parent eadd54865e
commit 9c14887d75
4 changed files with 4 additions and 13 deletions

View File

@ -1373,10 +1373,7 @@ GetAllKeysHelper::GetSuccessResult(JSContext* aCx,
NS_ASSERTION(mKeys.Length() <= mLimit, "Too many results!");
nsTArray<Key> keys;
if (!mKeys.SwapElements(keys)) {
NS_ERROR("Failed to swap elements!");
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
}
mKeys.SwapElements(keys);
JSAutoRequest ar(aCx);

View File

@ -1497,9 +1497,7 @@ public:
NS_ASSERTION(aRequestingDatabase, "Null pointer!");
NS_ASSERTION(aRequest, "Null pointer!");
if (!mWaitingDatabases.SwapElements(aWaitingDatabases)) {
NS_ERROR("This should never fail!");
}
mWaitingDatabases.SwapElements(aWaitingDatabases);
}
NS_IMETHOD Run()

View File

@ -146,9 +146,7 @@ public:
aWorkerPrivate->AssertIsOnWorkerThread();
NS_ASSERTION(!aIsWorkerScript || aLoadInfos.Length() == 1, "Bad args!");
if (!mLoadInfos.SwapElements(aLoadInfos)) {
NS_ERROR("This should never fail!");
}
mLoadInfos.SwapElements(aLoadInfos);
}
NS_IMETHOD

View File

@ -769,9 +769,7 @@ public:
{
aData.steal(&mData, &mDataByteCount);
if (!mClonedObjects.SwapElements(aClonedObjects)) {
NS_ERROR("This should never fail!");
}
mClonedObjects.SwapElements(aClonedObjects);
}
bool