Bug 1809043 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

After bug 1809035, [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects will be closed in [FileSystemManagerParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemManagerParent.cpp#487). We [plan](https://searchfox.org/mozilla-central/rev/72d9bf2d4128990cd1f349d4e15003e515277982/dom/quota/RemoteQuotaObjectParent.cpp#34) to verify the file in [RemoteQuotaObjectParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.cpp#33) and potentially change the size of the file. If we keep closing [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects in [FileSystemManagerParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemManagerParent.cpp#487) 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](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/datamodel/FileSystemDataManager.cpp#340) which is [called](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemAccessHandleParent.cpp#40) from [FileSystemAccessHandleParent::Close](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemAccessHandleParent.cpp#35) and the top level actor is always destroyed after actors for subprotocols. So [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects need to be closed during access handle closing in the parent process.
After bug 1809035, [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects will be closed in [FileSystemManagerParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemManagerParent.cpp#487). We [plan](https://searchfox.org/mozilla-central/rev/72d9bf2d4128990cd1f349d4e15003e515277982/dom/quota/RemoteQuotaObjectParent.cpp#34) to verify the file in [RemoteQuotaObjectParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.cpp#33) and potentially change the size of the file. If we keep closing [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects in [FileSystemManagerParent::ActorDestroy](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemManagerParent.cpp#487) then we might record wrong size of the file in the database (for quota management purposes) because the new file size is [updated](https://searchfox.org/mozilla-central/rev/7e0768e15786c5c3db0135d8612cedad6022fe64/dom/fs/parent/datamodel/FileSystemDataManager.cpp#348) in [FileSystemDataManager::UnlockExclusive](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/datamodel/FileSystemDataManager.cpp#340) which is [called](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemAccessHandleParent.cpp#40) from [FileSystemAccessHandleParent::Close](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/fs/parent/FileSystemAccessHandleParent.cpp#35) and the top level actor is always destroyed after actors for subprotocols. So [RemoteQuotaObjectParent](https://searchfox.org/mozilla-central/rev/0947c440956c648b853cf79a4737b282396abf09/dom/quota/RemoteQuotaObjectParent.h#17) objects need to be closed during access handle closing in the parent process.

Back to Bug 1809043 Comment 0