Open Bug 1588408 Opened 5 years ago Updated 2 years ago

IDB: Replace progress handlers with interrupt calls where possible

Categories

(Core :: Storage: IndexedDB, task, P3)

task

Tracking

()

People

(Reporter: janv, Unassigned)

References

Details

Per bug 1588068 comment 4, interrupt calls should be faster.

It should be possible to call interrupt from a different thread, however there's currently an assertion in mozStorage that prohibits that:
https://searchfox.org/mozilla-central/rev/6866d3a650c826f1cabd123663e84b95ee743701/storage/mozStorageConnection.cpp#1653

The existing interrupt method is currently biased towards async usage from the main thread. It probably make sense to add an explicit method InterruptFromDifferentThread() (or a similar name) that has the contract:

  • The owner isn't the main thread.
  • The connection is already initialized.
  • It's a sync connection (versus async).
  • It's fine if it's a read/write connection. The initial read/write limitation was intended as a very specific safety mechanism. (And it probably makes sense to leave that in place for the plain interrupt() method.)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.