W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2011

Re: [indexeddb] Should deleteDatabase return IDBVersionChangeRequest?

From: Jonas Sicking <jonas@sicking.cc>
Date: Wed, 15 Jun 2011 15:26:56 -0700
Message-ID: <BANLkTikdj=QrWoAKpKYtnjrYNCo+OQx8uQ@mail.gmail.com>
To: Israel Hilerio <israelh@microsoft.com>
Cc: "public-webapps@w3.org" <public-webapps@w3.org>
On Wed, Jun 15, 2011 at 2:15 PM, Israel Hilerio <israelh@microsoft.com> wrote:
> IDBFactory.deleteDatabase can be called without ever invoking the
> IDBDatabase.setVersion and requires a VERSION_CHANGE transaction for it to
> happen.  Unfortunately, there is no way for the caller of deleteDatabase to
> receive a blocked event because IDBRequest doesn't define an onblocked event
> handler.  Not having this functionality will prevent the deleteDatabase
> caller from understanding that someone has the DB locked and that the
> request cannot be honored.
>
>
>
> To support this scenario we would have to change the return value of
> IDBFactory.deleteDatabase to return an IDBVersionChangeRequest.  This will
> allow the caller to register an onblocked event handler and receive an event
> when the DB is locked by someone else.

Agreed!

> In addition, we may want to update the text in “4.10 Database deletion
> steps” step #6 from “fire a blocked event at request” to “fire a block event
> at version change request”.

Hmm.. isn't "request" just defined to be the variable used throughout
the algorithm to fire events at? It's more like a name of a variable
than a type. If you look at the VERSION_CHANGE transaction steps they
also simply use "request".

/ Jonas
Received on Wednesday, 15 June 2011 22:27:54 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:45 GMT