W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

RE: [indexeddb] Should deleteDatabase return IDBVersionChangeRequest?

From: Eliot Graff <Eliot.Graff@microsoft.com>
Date: Wed, 13 Jul 2011 22:20:09 +0000
To: Israel Hilerio <israelh@microsoft.com>, Jonas Sicking <jonas@sicking.cc>
CC: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <CE3A5BFD1228D84A8D9C158EEC195FD53CC9E619@TK5EX14MBXW601.wingroup.windeploy.ntdev.microsoft.com>
Changed return value and edited description to include:

If the steps above are successful, the implementation must set the result of the request to null and fire a success event at the request. The request will be an IDBVersionChangeRequest returned by those steps.

> -----Original Message-----
> From: public-webapps-request@w3.org [mailto:public-webapps-
> request@w3.org] On Behalf Of Israel Hilerio
> Sent: Thursday, June 16, 2011 5:20 PM
> To: Jonas Sicking
> Cc: public-webapps@w3.org
> Subject: RE: [indexeddb] Should deleteDatabase return
> IDBVersionChangeRequest?
> 
> On Thursday, June 16, 2011 4:49 PM, Jonas Sicking wrote:
> > On Wed, Jun 15, 2011 at 5:34 PM, Israel Hilerio
> > <israelh@microsoft.com>
> > wrote:
> > > On Wednesday, June 15, 2011 3:27 PM, Jonas Sicking wrote:
> > >> 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
> > >
> > > Great!
> > > If everyone else is okay with it, I'll work with Eliot to change the
> > > signature of
> > the method and we'll keep section 4.10 as is.
> > > Thanks,
> >
> > Sounds great! You probably need to mention in the text somewhere too
> > that the created request should implement the IDBVersionChangeRequest
> > interface. Look at how setVersion does it.
> >
> > / Jonas
> 
> Sounds good, we'll do.
> 
> Israel
> 
Received on Wednesday, 13 July 2011 22:20:38 GMT

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