"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "storage/mozStorageConnection.cpp" between
UXP-RELBASE_20210427.tar.gz and UXP-RELBASE_20210608.tar.gz

About: Basilisk is a full-featured, optimized browser derived from the code behind the pre-Servo Firefox browser (29–56 era). UXP = Unified XUL Platform. Source code.

mozStorageConnection.cpp  (UXP-RELBASE_20210427):mozStorageConnection.cpp  (UXP-RELBASE_20210608)
skipping to change at line 1993 skipping to change at line 1993
if (srv != SQLITE_OK) if (srv != SQLITE_OK)
return convertResultCode(srv); return convertResultCode(srv);
return NS_OK; return NS_OK;
} }
} }
return NS_ERROR_FAILURE; return NS_ERROR_FAILURE;
} }
// Implemented in TelemetryVFS.cpp
already_AddRefed<QuotaObject>
GetQuotaObjectForFile(sqlite3_file *pFile);
NS_IMETHODIMP NS_IMETHODIMP
Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject, Connection::GetQuotaObjects(QuotaObject** aDatabaseQuotaObject,
QuotaObject** aJournalQuotaObject) QuotaObject** aJournalQuotaObject)
{ {
MOZ_ASSERT(aDatabaseQuotaObject); MOZ_ASSERT(aDatabaseQuotaObject);
MOZ_ASSERT(aJournalQuotaObject); MOZ_ASSERT(aJournalQuotaObject);
if (!mDBConn) { if (!mDBConn) {
return NS_ERROR_NOT_INITIALIZED; return NS_ERROR_NOT_INITIALIZED;
} }
sqlite3_file* file; sqlite3_file* file;
int srv = ::sqlite3_file_control(mDBConn, int srv = ::sqlite3_file_control(mDBConn,
nullptr, nullptr,
SQLITE_FCNTL_FILE_POINTER, SQLITE_FCNTL_FILE_POINTER,
&file); &file);
if (srv != SQLITE_OK) { if (srv != SQLITE_OK) {
return convertResultCode(srv); return convertResultCode(srv);
} }
RefPtr<QuotaObject> databaseQuotaObject = GetQuotaObjectForFile(file);
if (NS_WARN_IF(!databaseQuotaObject)) {
return NS_ERROR_FAILURE;
}
srv = ::sqlite3_file_control(mDBConn, srv = ::sqlite3_file_control(mDBConn,
nullptr, nullptr,
SQLITE_FCNTL_JOURNAL_POINTER, SQLITE_FCNTL_JOURNAL_POINTER,
&file); &file);
if (srv != SQLITE_OK) { if (srv != SQLITE_OK) {
return convertResultCode(srv); 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; return NS_OK;
} }
} // namespace storage } // namespace storage
} // namespace mozilla } // namespace mozilla
 End of changes. 3 change blocks. 
0 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)