mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1414737 - Ensure Connection::GetQuotaObjects only returns NS_OK if the quota objects are non-null. r=janv,dom-workers-and-storage-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D60135 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
5e4d1b86a6
commit
916d2ad550
@ -2264,6 +2264,9 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
|
||||
}
|
||||
|
||||
RefPtr<QuotaObject> databaseQuotaObject = GetQuotaObjectForFile(file);
|
||||
if (NS_WARN_IF(!databaseQuotaObject)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
srv = ::sqlite3_file_control(mDBConn, nullptr, SQLITE_FCNTL_JOURNAL_POINTER,
|
||||
&file);
|
||||
@ -2272,6 +2275,9 @@ Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
|
||||
}
|
||||
|
||||
RefPtr<QuotaObject> journalQuotaObject = GetQuotaObjectForFile(file);
|
||||
if (NS_WARN_IF(!journalQuotaObject)) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
databaseQuotaObject.forget(aDatabaseQuotaObject);
|
||||
journalQuotaObject.forget(aJournalQuotaObject);
|
||||
|
Loading…
Reference in New Issue
Block a user