Bug 697992 - Use DebugOnly/NS_WARN_IF_FALSE in dom/src/storage/nsDOMStorage.cpp. r=mak.

This commit is contained in:
Rafael Ávila de Espíndola 2011-10-28 18:29:34 -04:00
parent 6bf016eada
commit 1ba6ab147a

View File

@ -470,15 +470,17 @@ nsDOMStorageManager::Observe(nsISupports *aSubject,
} else if (!strcmp(aTopic, "profile-before-change") ||
!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
if (DOMStorageImpl::gStorageDB) {
nsresult rv = DOMStorageImpl::gStorageDB->FlushAndDeleteTemporaryTables(true);
if (NS_FAILED(rv))
NS_WARNING("DOMStorage: temporary table commit failed");
DebugOnly<nsresult> rv =
DOMStorageImpl::gStorageDB->FlushAndDeleteTemporaryTables(true);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"DOMStorage: temporary table commit failed");
}
} else if (!strcmp(aTopic, NS_DOMSTORAGE_FLUSH_TIMER_OBSERVER)) {
if (DOMStorageImpl::gStorageDB) {
nsresult rv = DOMStorageImpl::gStorageDB->FlushAndDeleteTemporaryTables(false);
if (NS_FAILED(rv))
NS_WARNING("DOMStorage: temporary table commit failed");
DebugOnly<nsresult> rv =
DOMStorageImpl::gStorageDB->FlushAndDeleteTemporaryTables(false);
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv),
"DOMStorage: temporary table commit failed");
}
}