Closed Bug 1809043 Opened 9 months ago Closed 8 months ago

Close RemoteQuotaObjectParent during access handle closing in the parent process

Categories

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

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: janv, Assigned: janv)

References

(Blocks 1 open bug)

Details

Attachments

(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 jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9a864bf574db
Make FileSystemDataManager ref counting thredsafe; r=dom-storage-reviewers,jari
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cb987c82fdda
Create a dedicated parent object for access handles independent from IPC; r=dom-storage-reviewers,jari
Keywords: leave-open
Pushed by jvarga@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7f6f2e321e73
Prepare FileSystemAccessHandle for asynchronous closing; r=dom-storage-reviewers,jari
https://hg.mozilla.org/integration/autoland/rev/8d99cca8f722
Prepare FileSystemAccessHandle for asynchronous creation; r=dom-storage-reviewers,jari
https://hg.mozilla.org/integration/autoland/rev/d7ef9833e3cc
Register active FileSystemAccessHandles in FileSystemDataManager; r=dom-storage-reviewers,jari
https://hg.mozilla.org/integration/autoland/rev/59847b64b45d
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.