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

http://www.w3.org/Bugs/Public/show_bug.cgi?id=11280

           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
property.

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