зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1164559 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj
This commit is contained in:
Родитель
8211d94335
Коммит
45167dace5
|
@ -244,7 +244,7 @@ Vacuumer::HandleError(mozIStorageError *aError)
|
||||||
NS_WARNING(warnMsg.get());
|
NS_WARNING(warnMsg.get());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
{
|
if (PR_LOG_TEST(gStorageLog, PR_LOG_ERROR)) {
|
||||||
int32_t result;
|
int32_t result;
|
||||||
nsresult rv = aError->GetResult(&result);
|
nsresult rv = aError->GetResult(&result);
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
NS_ENSURE_SUCCESS(rv, rv);
|
||||||
|
|
|
@ -897,11 +897,13 @@ Connection::internalClose(sqlite3 *aNativeConnection)
|
||||||
}
|
}
|
||||||
#endif // DEBUG
|
#endif // DEBUG
|
||||||
|
|
||||||
nsAutoCString leafName(":memory");
|
if (PR_LOG_TEST(gStorageLog, PR_LOG_NOTICE)) {
|
||||||
if (mDatabaseFile)
|
nsAutoCString leafName(":memory");
|
||||||
(void)mDatabaseFile->GetNativeLeafName(leafName);
|
if (mDatabaseFile)
|
||||||
PR_LOG(gStorageLog, PR_LOG_NOTICE, ("Closing connection to '%s'",
|
(void)mDatabaseFile->GetNativeLeafName(leafName);
|
||||||
leafName.get()));
|
PR_LOG(gStorageLog, PR_LOG_NOTICE, ("Closing connection to '%s'",
|
||||||
|
leafName.get()));
|
||||||
|
}
|
||||||
|
|
||||||
// At this stage, we may still have statements that need to be
|
// At this stage, we may still have statements that need to be
|
||||||
// finalized. Attempt to close the database connection. This will
|
// finalized. Attempt to close the database connection. This will
|
||||||
|
|
|
@ -604,7 +604,7 @@ Statement::ExecuteStep(bool *_moreResults)
|
||||||
}
|
}
|
||||||
int srv = mDBConnection->stepStatement(mNativeConnection, mDBStatement);
|
int srv = mDBConnection->stepStatement(mNativeConnection, mDBStatement);
|
||||||
|
|
||||||
if (srv != SQLITE_ROW && srv != SQLITE_DONE) {
|
if (srv != SQLITE_ROW && srv != SQLITE_DONE && PR_LOG_TEST(gStorageLog, PR_LOG_DEBUG)) {
|
||||||
nsAutoCString errStr;
|
nsAutoCString errStr;
|
||||||
(void)mDBConnection->GetLastErrorString(errStr);
|
(void)mDBConnection->GetLastErrorString(errStr);
|
||||||
PR_LOG(gStorageLog, PR_LOG_DEBUG,
|
PR_LOG(gStorageLog, PR_LOG_DEBUG,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче