- From: <bugzilla@jessica.w3.org>
- Date: Tue, 02 Jul 2013 22:09:20 +0000
- To: public-webapps@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22540
Bug ID: 22540
Summary: Fire event when database connection is closed without
explicit close() call
Classification: Unclassified
Product: WebAppsWG
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: Indexed Database API
Assignee: dave.null@w3.org
Reporter: jsbell@google.com
QA Contact: public-webapps-bugzilla@w3.org
CC: mike@w3.org, public-webapps@w3.org
NOTE: the following is a proposal for a future version of IndexedDB
Just as an event is fired at a transaction when the transaction implicitly
aborts (but not when abort() is called), there are cases where a database
connection may close even without close() being called, and script should be
notified with an event.
Scenarios:
* the user invokes the browser's "clear my stored data" option which deletes
the backing store
* backing store is on a removable storage medium; the browser detects when the
medium is removed and further read/write attempts to the database will fail
(while file handles will be lost, arguably the implementation could do some
magic in this scenario to reestablish the connection behind the scenes, simply
failing any attempted transactions with UnknownError in the mean time)
Proposal:
If the connection to the database is closed other than by a call to close():
1. set the /closePending/ flag of /transaction/
2. for each transaction created using /connection/ that is not complete, run
the steps for aborting the transaction with /transaction/ and "AbortError"
3. fire a "connectionclosed" event at /connection/; the event does not bubble
and is not cancelable
--
You are receiving this mail because:
You are on the CC list for the bug.
Received on Tuesday, 2 July 2013 22:09:21 UTC