This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9796 - IndexedDB's async interface should be available within workers
Summary: IndexedDB's async interface should be available within workers
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: Indexed Database API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: public-webapps-bugzilla
Depends on:
Reported: 2010-05-22 10:33 UTC by Jeremy Orlow
Modified: 2014-10-02 19:26 UTC (History)
6 users (show)

See Also:


Description Jeremy Orlow 2010-05-22 10:33:20 UTC
Pablo originally suggested this in "[IndexedDB] Detailed comments for the current draft" [1]: "Currently the async API is only available on the window object and not to workers. Libraries are likely to target only one mode, in particular async, to work across all scenarios. So it would be important to have async also in workers."

As far as I can tell, no one has ever disagreed with this comment and recently it came up again late in the "[IndexedDB] Proposal for async API changes" thread [2].

>On Thu, May 20, 2010 at 9:37 PM, Shawn Wilsher <> wrote:
>> On 5/20/2010 12:19 PM, Jonas Sicking wrote:
>>> I additionally like the naming convention. The async interfaces is
>>> probably the interface that people will use first. Additionally that
>>> interface is available both to workers and to the main thread. So it
>>> makes sense to give the async interface the simpler name.
>> That is not how it is currently specified (and our proposal doesn't
>> indicate either way).  The asynchronous versions are not available to worker
>> threads.  I do recall discussion on this, however...

That makes Mozilla, Google, and Microsoft all in favor of this feature.  We should do it.

There's one small snag though: the current spec has an "indexedDB" property on Window and WorkerUtils that point to different interfaces (one sync, one not).  We should probably change WorkerUtils.indexedDB to WorkerUtils.indexedDBSync to be more inline with what other synchronous APIs have done (that have an async counterpart).

Comment 1 Nikunj Mehta 2010-06-14 15:24:40 UTC
The attribute indexedDB of IDBEnvironmentSync should be renamed to indexedDBSync. IDBEnvironment can then be implemented by WorkerUtils