mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 385262 - NOTREACHED called before logging. Patch by Ryan Jones <sciguyryan@gmail.com>. r=sdwilsh
This commit is contained in:
parent
1b35379c96
commit
fe4b51fc1e
@ -1530,8 +1530,18 @@ ProcessAsyncMessages()
|
||||
// check for error
|
||||
if (rc != SQLITE_OK) {
|
||||
AsyncWriteError = rc;
|
||||
NS_NOTREACHED("FILE ERROR");
|
||||
|
||||
nsAutoString logMessage;
|
||||
logMessage.AssignLiteral("mozStorage: error code ");
|
||||
logMessage.AppendInt(rc);
|
||||
logMessage.AppendLiteral(" for database ");
|
||||
if (message->mFile && message->mFile->mFilename)
|
||||
logMessage.Append(NS_ConvertUTF8toUTF16(*message->mFile->mFilename));
|
||||
|
||||
#ifdef DEBUG
|
||||
printf("%s\n", NS_ConvertUTF16toUTF8(logMessage).get());
|
||||
#endif
|
||||
|
||||
// log error to console
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsIConsoleService> consoleSvc =
|
||||
@ -1539,16 +1549,12 @@ ProcessAsyncMessages()
|
||||
if (NS_FAILED(rv)) {
|
||||
NS_WARNING("Couldn't get the console service for logging file error");
|
||||
} else {
|
||||
nsAutoString logMessage;
|
||||
logMessage.AssignLiteral("mozStorage: error code ");
|
||||
logMessage.AppendInt(rc);
|
||||
logMessage.AppendLiteral(" for database ");
|
||||
if (message->mFile && message->mFile->mFilename)
|
||||
logMessage.Append(NS_ConvertUTF8toUTF16(*message->mFile->mFilename));
|
||||
rv = consoleSvc->LogStringMessage(logMessage.get());
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Couldn't log message on async error");
|
||||
}
|
||||
|
||||
NS_NOTREACHED("FILE ERROR");
|
||||
|
||||
// tell user to restart
|
||||
DisplayAsyncWriteError();
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user