W3C home > Mailing lists > Public > public-webapps@w3.org > October to December 2011

[indexeddb] Calling IDBDatabase.close inside onupgradeneeded handler

From: Israel Hilerio <israelh@microsoft.com>
Date: Wed, 12 Oct 2011 23:06:04 +0000
To: "public-webapps@w3.org" <public-webapps@w3.org>
CC: Victor Ngo <vicngo@microsoft.com>, Adam Herchenroether <aherchen@microsoft.com>
Message-ID: <F695AF7AA77CC745A271AD0F61BBC61E3F4C9026@TK5EX14MBXC117.redmond.corp.microsoft.com>
If a db connection is closed inside the onupgradeneeded handler, section 4.1 step #8 states that we should return an ABORT_ERR and abort steps. This implies that the transaction should fail. Since today, the db is closed after all requests have been processed, we don't see the reason why we would return an error instead of just allowing the db connection to follow its natural course. The worst that can happen is that we return a handle to a closed db, which is what the developer intended.

Should we remove this constraint and not error out on this particular case (i.e. calling db.close from onupgradeneeded)? Or, are there reasons to keep this logic around?

Received on Wednesday, 12 October 2011 23:06:42 UTC

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