Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bug 853562 - Fix nsTArray::SetCapacity callers in IndexedDB to not lo…

…ok at the return value; r=bent
  • Loading branch information...
commit 80eff6586ba58a8d15e8827f2dc98ceb16077799 1 parent b8f28be
@ehsan ehsan authored
Showing with 2 additions and 5 deletions.
  1. +2 −5 dom/indexedDB/IDBObjectStore.cpp
View
7 dom/indexedDB/IDBObjectStore.cpp
@@ -3936,14 +3936,11 @@ GetAllHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
bool hasResult;
while (NS_SUCCEEDED((rv = stmt->ExecuteStep(&hasResult))) && hasResult) {
if (mCloneReadInfos.Capacity() == mCloneReadInfos.Length()) {
- if (!mCloneReadInfos.SetCapacity(mCloneReadInfos.Capacity() * 2)) {
- NS_ERROR("Out of memory!");
- return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
- }
+ mCloneReadInfos.SetCapacity(mCloneReadInfos.Capacity() * 2);
}
StructuredCloneReadInfo* readInfo = mCloneReadInfos.AppendElement();
- NS_ASSERTION(readInfo, "Shouldn't fail if SetCapacity succeeded!");
+ NS_ASSERTION(readInfo, "Shouldn't fail since SetCapacity succeeded!");
rv = IDBObjectStore::GetStructuredCloneReadInfoFromStatement(stmt, 0, 1,
mDatabase, *readInfo);
Please sign in to comment.
Something went wrong with that request. Please try again.