W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2010

[Bug 11280] New: IDBFactory.databases doesn't work

From: <bugzilla@jessica.w3.org>
Date: Tue, 09 Nov 2010 22:49:44 +0000
To: public-webapps@w3.org
Message-ID: <bug-11280-2927@http.www.w3.org/Bugs/Public/>

           Summary: IDBFactory.databases doesn't work
           Product: WebAppsWG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: dave.null@w3.org
        ReportedBy: jonas@sicking.cc
         QAContact: member-webapi-cvs@w3.org
                CC: mike@w3.org, public-webapps@w3.org

I've somehow missed this until now, but apparently IDBFactory has a .databases

While I could see the use for this, it can't be implemented in a non-racy way.
The problem is that other processes or threads can create and delete databases
at any time, so there is no way to guarantee that a database which existed when
.databases is checked, will exist a few milliseconds later when the knowledge
of a database's existence is used. For example

if (indexedDB.databases.contains("hello")) {
  indexedDB.open("hello").onsuccess = ...;

has a race condition.

Another problem is that it can't be implemented without blocking the main
thread while going off to another thread or process where the indexedDB
implementation lives. It'll likely also require synchronous IO to get the list
of databases from file.

I suggest we simply remove it for now.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Tuesday, 9 November 2010 22:49:46 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:28 UTC