HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3210

File a bug

SVNBugCommentTime (UTC)
3210Add a .rollback() method for the sync database API, so you don't have to depend on GC if you want to give up a transaction. (credit: ap)2009-06-06 03:16
Index: source
===================================================================
--- source	(revision 3209)
+++ source	(revision 3210)
@@ -61127,6 +61127,7 @@
 interface <dfn>SQLTransactionSync</dfn> {
   <span>SQLResultSet</span> <span title="dom-sqltransaction-sync-executeSql">executeSql</span>(in DOMString sqlStatement, [Optional] in <span>ObjectArray</span> arguments);
   void <span title="dom-sqltransaction-sync-commit">commit</span>();
+  void <span title="dom-sqltransaction-sync-rollback">rollback</span>();
 };</pre>
 
   <p>A <code>SQLTransactionSync</code> object is initially <i
@@ -61199,6 +61200,22 @@
 
   </ol>
 
+  <hr>
+
+  <p>When the <dfn
+  title="dom-sqltransaction-sync-rollback"><code>rollback()</code></dfn>
+  method is invoked, the user agent must run the following
+  algorithm:</p>
+
+  <ol>
+
+   <li><p>Rollback the transaction.</p></li>
+
+   <li><p>Mark the <code>SQLTransactionSync</code> object as <i
+   title="">stale</i>.</p>
+
+  </ol>
+
   <p>If a <code>SQLTransactionSync</code> object is garbage collected
   while still <i title="">fresh</i>, the user agent must rollback the
   transaction.</p>

|