mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1164559 - Part 2: Wrap expensive calls in PR_LOG_TEST. r=froydnj
This commit is contained in:
parent
919620d653
commit
569c352964
@ -244,7 +244,7 @@ Vacuumer::HandleError(mozIStorageError *aError)
|
||||
NS_WARNING(warnMsg.get());
|
||||
#endif
|
||||
|
||||
{
|
||||
if (PR_LOG_TEST(gStorageLog, PR_LOG_ERROR)) {
|
||||
int32_t result;
|
||||
nsresult rv = aError->GetResult(&result);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
@ -897,11 +897,13 @@ Connection::internalClose(sqlite3 *aNativeConnection)
|
||||
}
|
||||
#endif // DEBUG
|
||||
|
||||
nsAutoCString leafName(":memory");
|
||||
if (mDatabaseFile)
|
||||
(void)mDatabaseFile->GetNativeLeafName(leafName);
|
||||
PR_LOG(gStorageLog, PR_LOG_NOTICE, ("Closing connection to '%s'",
|
||||
leafName.get()));
|
||||
if (PR_LOG_TEST(gStorageLog, PR_LOG_NOTICE)) {
|
||||
nsAutoCString leafName(":memory");
|
||||
if (mDatabaseFile)
|
||||
(void)mDatabaseFile->GetNativeLeafName(leafName);
|
||||
PR_LOG(gStorageLog, PR_LOG_NOTICE, ("Closing connection to '%s'",
|
||||
leafName.get()));
|
||||
}
|
||||
|
||||
// At this stage, we may still have statements that need to be
|
||||
// finalized. Attempt to close the database connection. This will
|
||||
|
@ -604,7 +604,7 @@ Statement::ExecuteStep(bool *_moreResults)
|
||||
}
|
||||
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;
|
||||
(void)mDBConnection->GetLastErrorString(errStr);
|
||||
PR_LOG(gStorageLog, PR_LOG_DEBUG,
|
||||
|
Loading…
Reference in New Issue
Block a user