<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>11280</bug_id>
          
          <creation_ts>2010-11-09 22:49:44 +0000</creation_ts>
          <short_desc>IDBFactory.databases doesn&apos;t work</short_desc>
          <delta_ts>2010-11-12 19:16:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>Indexed Database API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jonas Sicking (Not reading bugmail)">jonas</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>jorlow</cc>
    
    <cc>mike</cc>
    
    <cc>public-webapps</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>42332</commentid>
    <comment_count>0</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-09 22:49:44 +0000</bug_when>
    <thetext>I&apos;ve somehow missed this until now, but apparently IDBFactory has a .databases property.

While I could see the use for this, it can&apos;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&apos;s existence is used. For example

if (indexedDB.databases.contains(&quot;hello&quot;)) {
  indexedDB.open(&quot;hello&quot;).onsuccess = ...;
}

has a race condition.

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

I suggest we simply remove it for now.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>42495</commentid>
    <comment_count>1</comment_count>
    <who name="Jonas Sicking (Not reading bugmail)">jonas</who>
    <bug_when>2010-11-12 19:16:51 +0000</bug_when>
    <thetext>Removed http://dvcs.w3.org/hg/IndexedDB/rev/148857621627</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>