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

[indexeddb] Should deleteDatabase return IDBVersionChangeRequest?

From: Israel Hilerio <israelh@microsoft.com>
Date: Wed, 15 Jun 2011 21:15:49 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3D14EC06@TK5EX14MBXC115.redmond.corp.microsoft.com>
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.

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

Do you agree?

Received on Wednesday, 15 June 2011 21:16:20 UTC

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