Skip to content

Commit

Permalink
Bug 855276: Moar diagnostics.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Apr 9, 2013
1 parent c0a9f0f commit 59dacf8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dom/indexedDB/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ Client::WaitForStoragesToComplete(nsTArray<nsIOfflineStorage*>& aStorages,
nsTArray<IDBDatabase*> databases(aStorages.Length());
for (uint32_t index = 0; index < aStorages.Length(); index++) {
IDBDatabase* database = IDBDatabase::FromStorage(aStorages[index]);
NS_ASSERTION(database, "This shouldn't be null!");
if (!database) {
MOZ_CRASH();
}

databases.AppendElement(database);
}
Expand Down
7 changes: 6 additions & 1 deletion dom/indexedDB/TransactionThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,12 @@ TransactionThreadPool::MaybeFireCallback(DatabasesCompleteCallback& aCallback)
NS_ASSERTION(NS_IsMainThread(), "Wrong thread!");

for (uint32_t index = 0; index < aCallback.mDatabases.Length(); index++) {
if (mTransactionsInProgress.Get(aCallback.mDatabases[index]->Id(),
IDBDatabase* database = aCallback.mDatabases[index];
if (!database) {
MOZ_CRASH();
}

if (mTransactionsInProgress.Get(database->Id(),
nullptr)) {
return false;
}
Expand Down

0 comments on commit 59dacf8

Please sign in to comment.