Stop using Worker
Main Thread Runnables for navigator .storage .estimate() and navigator .storage .persisted() on Workers
(Core :: Storage: StorageManager, enhancement, P3)
(Reporter: asuth, Unassigned)
For unclear reasons we use a WorkerMainThreadRunnable to synchronously dispatch estimate() and persisted() to the main thread. Since the methods return promises and the promises are already asynchronously resolved, it doesn't seem like the synchronous dispatch is necessary and a normal runnable would likely suffice. (The PromiseWorkerProxy associated with the request already holds a strong/threadsafe WorkerRef, which addresses most lifecycle concerns.)
2 years ago
It might also make sense to just directly do the IPC from the worker, possibly splitting PQuota. Right now we use PQuota for both test-only nsIQuotaManagerService, chrome-privileged privacy-related calls, and also for the StorageManager explicit content API calls. This could happen as part of implementing multiple storage buckets which might want to see the introduction of an explicit actor for buckets / origins.
6 months ago