Open Bug 1625311 Opened 4 years ago Updated 2 years ago

Stop using WorkerMainThreadRunnables for and on Workers


(Core :: Storage: StorageManager, enhancement, P3)




Tracking Status
firefox76 --- affected


(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.)

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.

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.