http://www.w3.org/Bugs/Public/show_bug.cgi?id=11396

           Summary: Add a callback to IDBDatabaseSync.transaction
           Product: WebAppsWG
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Indexed Database API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
                CC: [email protected], [email protected]


In the TPAC folks proposed to tweak the sync API such that it prevents code
patterns that cause deadlocks at the start of a transaction.

We ended up with a proposal where we'd add a callback to
IDBDatabaseSync.transaction, and work in that transaction can only happen
within the callback.

The change would be:
- add a callback argument to IDBDatabaseSync.transaction(), the callback will
receive one argument that's the transaction object
- once the callback returns, the transaction is committed
- if an exception is thrown and not caught inside the callback then the
transaction must be aborted
- make the method void, no transaction object is returned
- a call to transaction() from within a transaction callback or an async API
callback that involves a transaction will fail with NOT_ALLOWED_ERR.

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Reply via email to