Closed Bug 1809043 Opened 9 months ago Closed 8 months ago

Close RemoteQuotaObjectParent during access handle closing in the parent process


(Core :: DOM: File, task, P2)




111 Branch
Tracking Status
firefox111 --- fixed


(Reporter: janv, Assigned: janv)


(Blocks 1 open bug)



(6 files)

After bug 1809035, RemoteQuotaObjectParent objects will be closed in FileSystemManagerParent::ActorDestroy. We plan to verify the file in RemoteQuotaObjectParent::ActorDestroy and potentially change the size of the file. If we keep closing RemoteQuotaObjectParent objects in FileSystemManagerParent::ActorDestroy then we might record wrong size of the file in the database (for quota management purposes) because the new file size is updated in FileSystemDataManager::UnlockExclusive which is called from FileSystemAccessHandleParent::Close and the top level actor is always destroyed after actors for subprotocols. So RemoteQuotaObjectParent objects need to be closed during access handle closing in the parent process.

The destructor still has to run on the owning thread.

Depends on D166273

Parent objects are usually actors as well, but the access handle is special
because it will need to have multiple actors.

Depends on D166297

Asynchronous closing can't be triggered from the destructor because it needs to
add a strong ref to self.

Depends on D166298

FileSystemAccessHandle::Create now returns a MozPromise, but the creation does
nothing on other threads for now.

Depends on D166299

Active FileSystemAccessHandles will prevent FileSystemDataManager from closing.

Depends on D166300

Depends on: 1809035
Blocks: 1809064
Keywords: leave-open
Pushed by
Make FileSystemDataManager ref counting thredsafe; r=dom-storage-reviewers,jari
Pushed by
Create a dedicated parent object for access handles independent from IPC; r=dom-storage-reviewers,jari
Keywords: leave-open
Pushed by
Prepare FileSystemAccessHandle for asynchronous closing; r=dom-storage-reviewers,jari
Prepare FileSystemAccessHandle for asynchronous creation; r=dom-storage-reviewers,jari
Register active FileSystemAccessHandles in FileSystemDataManager; r=dom-storage-reviewers,jari
Close RemoteQuotaObjectParent during access handle closing in the parent process; r=dom-storage-reviewers,jari
You need to log in before you can comment on or make changes to this bug.