mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 04:15:43 +00:00
bug 856700 - don't check the result of infalible nsTArray::SwapElements() in dom/ r=khuey
This commit is contained in:
parent
eadd54865e
commit
9c14887d75
@ -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);
|
||||
|
||||
|
@ -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()
|
||||
|
@ -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
|
||||
|
@ -769,9 +769,7 @@ public:
|
||||
{
|
||||
aData.steal(&mData, &mDataByteCount);
|
||||
|
||||
if (!mClonedObjects.SwapElements(aClonedObjects)) {
|
||||
NS_ERROR("This should never fail!");
|
||||
}
|
||||
mClonedObjects.SwapElements(aClonedObjects);
|
||||
}
|
||||
|
||||
bool
|
||||
|
Loading…
Reference in New Issue
Block a user