Bug 1617170 - Rename GetNewFileInfo to CreateFileInfo. r=dom-workers-and-storage-reviewers,janv

Differential Revision: https://phabricator.services.mozilla.com/D63654

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Simon Giesecke 2020-03-02 16:16:16 +00:00
Родитель 63850cb6a7
Коммит 5707a7127b
2 изменённых файлов: 5 добавлений и 5 удалений

Просмотреть файл

@ -13832,7 +13832,7 @@ Database::AllocPBackgroundIDBDatabaseFileParent(const IPCBlob& aIPCBlob) {
actor = new DatabaseFile(fileInfo);
} else {
// This is a blob we haven't seen before.
fileInfo = mFileManager->GetNewFileInfo();
fileInfo = mFileManager->CreateFileInfo();
MOZ_ASSERT(fileInfo);
actor = new DatabaseFile(blobImpl, fileInfo);
@ -16409,7 +16409,7 @@ RefPtr<FileInfo> FileManager::GetFileInfo(int64_t aId) const {
return fileInfo;
}
RefPtr<FileInfo> FileManager::GetNewFileInfo() {
RefPtr<FileInfo> FileManager::CreateFileInfo() {
MOZ_ASSERT(!IndexedDatabaseManager::IsClosed());
// TODO: We cannot simply change this to RefPtr<FileInfo>, because
@ -23333,7 +23333,7 @@ nsresult CreateFileOp::DoDatabaseWork() {
FileManager* fileManager = mDatabase->GetFileManager();
mFileInfo.init(fileManager->GetNewFileInfo());
mFileInfo.init(fileManager->CreateFileInfo());
if (NS_WARN_IF(!*mFileInfo)) {
IDB_REPORT_INTERNAL_ERR();
return NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR;
@ -25054,7 +25054,7 @@ bool ObjectStoreAddOrPutRequestOp::Init(TransactionBase* aTransaction) {
if (mDataOverThreshold) {
mStoredFileInfos.EmplaceBack(StoredFileInfo::CreateForStructuredClone(
aTransaction->GetDatabase()->GetFileManager()->GetNewFileInfo(),
aTransaction->GetDatabase()->GetFileManager()->CreateFileInfo(),
MakeRefPtr<SCInputStream>(mParams.cloneInfo().data().data)));
}

Просмотреть файл

@ -91,7 +91,7 @@ class FileManager final {
MOZ_MUST_USE RefPtr<FileInfo> GetFileInfo(int64_t aId) const;
MOZ_MUST_USE RefPtr<FileInfo> GetNewFileInfo();
MOZ_MUST_USE RefPtr<FileInfo> CreateFileInfo();
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileManager)