mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Revert "Issue #21 - Remove TelemertyVFS"
This: - reverts commit 83ecae9ff7ee1469da1675435dbcf26d094aa1c6 - adds a failure check to Connection::GetQuotaObjects This resolves #1768.
This commit is contained in:
parent
98f29e4737
commit
90df4cfb70
9 changed files with 1286 additions and 1 deletions
|
|
@ -1991,6 +1991,10 @@ Connection::EnableModule(const nsACString& aModuleName)
|
|||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
// Implemented in TelemetryVFS.cpp
|
||||
already_AddRefed<QuotaObject>
|
||||
GetQuotaObjectForFile(sqlite3_file *pFile);
|
||||
|
||||
NS_IMETHODIMP
|
||||
Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
|
||||
QuotaObject** aJournalQuotaObject)
|
||||
|
|
@ -2011,6 +2015,11 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
|
|||
return convertResultCode(srv);
|
||||
}
|
||||
|
||||
RefPtr<QuotaObject> databaseQuotaObject = GetQuotaObjectForFile(file);
|
||||
if (NS_WARN_IF(!databaseQuotaObject)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
srv = ::sqlite3_file_control(mDBConn,
|
||||
nullptr,
|
||||
SQLITE_FCNTL_JOURNAL_POINTER,
|
||||
|
|
@ -2019,6 +2028,13 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
|
|||
return convertResultCode(srv);
|
||||
}
|
||||
|
||||
RefPtr<QuotaObject> journalQuotaObject = GetQuotaObjectForFile(file);
|
||||
if (NS_WARN_IF(!journalQuotaObject)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
databaseQuotaObject.forget(aDatabaseQuotaObject);
|
||||
journalQuotaObject.forget(aJournalQuotaObject);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue