[indexeddb] Calling IDBDatabase.close inside onupgradeneeded handler

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?

Israel

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