[html5] r1064 - /

whatwg at whatwg.org whatwg at whatwg.org
Wed Oct 17 15:53:58 PDT 2007


Author: ianh
Date: 2007-10-17 15:53:57 -0700 (Wed, 17 Oct 2007)
New Revision: 1064

Modified:
   index
   source
Log:
[] (0) SQL: Make expected version '' allow any version, but actual version '' not work with any random version. Make changeVersion() async.

Modified: index
===================================================================
--- index	2007-10-17 07:36:12 UTC (rev 1063)
+++ index	2007-10-17 22:53:57 UTC (rev 1064)
@@ -30226,7 +30226,7 @@
    database already exists but has a different version, then the method must
    raise an <code>INVALID_STATE_ERR</code> exception.
 
-  <p>Otherwise, if the database version is the empty string, or if the
+  <p>Otherwise, if the database provided is the empty string, or if the
    database doesn't yet exist, or if the database exists and the version
    provided to the <code title=dom-opendatabase><a
    href="#opendatabase">openDatabase()</a></code> method is the same as the
@@ -30256,11 +30256,15 @@
 
 interface <dfn id=database0>Database</dfn> {
   readonly attribute DOMString <a href="#version" title=dom-database-version>version</a>;
-  bool <a href="#changeversion" title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion);
+  void <a href="#changeversion" title=dom-database-changeVersion>changeVersion</a>(in DOMString oldVersion, in DOMString newVersion, in <a href="#versionchangecallback">VersionChangeCallback</a> callback);
   void <a href="#executesql" title=dom-database-executeSql>executeSql</a>(in DOMString sqlStatement, in <a href="#objectarray">ObjectArray</a> arguments, in <a href="#sqlcallback">SQLCallback</a> callback);
   void <a href="#closetransaction" title=dom-database-closeTransaction>closeTransaction</a>();
 };
 
+interface <dfn id=versionchangecallback>VersionChangeCallback</dfn> {
+  void <span title=dom-versionchangecallback-handleEvent>handleEvent</span>(in bool versionChanged);
+};
+
 interface <dfn id=sqlcallback>SQLCallback</dfn> {
   void <span title=dom-sqlcallback-handleEvent>handleEvent</span>(in <a href="#sqlresultset">SQLResultSet</a> resultSet);
 };</pre>
@@ -30276,19 +30280,21 @@
   <p>The <dfn id=changeversion
    title=dom-database-changeVersion>changeVersion()</dfn> method allows you
    to atomically verify the version number and change it. When the method is
-   invoked, the user agent must obtain a full lock of the database (waiting
-   for all open transactions to be closed), and then must verify that the
-   current version of the database matches the first argument to the method.
-   If it does not match, then the user agent must release the lock and return
-   false. Otherwise, the current version matches the first argument, and the
-   user agent must change the current version of the database and the <a
-   href="#expected" title=concept-database-expected-version>expected
-   version</a> of the <code><a href="#database0">Database</a></code> object
-   on which the method was invoked to the value of the second argument. Then,
-   the lock must be released. Any <code><a
-   href="#database0">Database</a></code> instances that have an expected
-   version that differs from the new version will start failing at this
-   point. Finally, the method must return true.
+   invoked, it must immediately return, and then the user agent must obtain a
+   full lock of the database (waiting for all open transactions to be
+   closed), and then must verify that the current version of the database
+   matches the first argument to the method. If it does not match, then the
+   user agent must release the lock and invoke the callback argument with the
+   value false as the callback's argument. Otherwise, the current version
+   matches the first argument, and the user agent must change the current
+   version of the database and the <a href="#expected"
+   title=concept-database-expected-version>expected version</a> of the
+   <code><a href="#database0">Database</a></code> object on which the method
+   was invoked to the value of the second argument. Then, the lock must be
+   released. Any <code><a href="#database0">Database</a></code> instances
+   that have an expected version that differs from the new version will start
+   failing at this point. Finally, the method must invoke its callback
+   argument with the value true as the callback's argument.
 
   <h4 id=executing><span class=secno>4.11.3. </span>Executing SQL statements</h4>
 
@@ -44812,8 +44818,8 @@
    Sutton, Agustín Fernández, Alexey Feldgendler, Andrew Gove,
    Andrew Sidwell, Anne van Kesteren, Anthony Hickson, Asbjørn
    Ulsberg, Ben Godfrey, Ben Meadowcroft, Benjamin Hawkes-Lewis, Bert Bos,
-   Bjoern Hoehrmann, Boris Zbarsky, Brad Fults, Brad Neuberg, Brendan Eich,
-   Brett Wilson, Carlos Perelló Marín, Chao Cai,
+   Bjoern Hoehrmann, Boris Zbarsky, Brad Fults, Brad Neuberg, Brady Eidson,
+   Brendan Eich, Brett Wilson, Carlos Perelló Marín, Chao Cai,
    &#xc724;&#xc11d;&#xcc2c; (Channy Yun), Charl van
    Niekerk<!--status.whatwg.org maintainer-->, Charles Iliya Krempeaux,
    Charles McCathieNevile, Christian Biesinger, Christian Johansen, Chriswa,
@@ -44837,7 +44843,8 @@
    Matthew Thomas, Mattias Waldau, Max Romantschuk, Michael 'Ratt'
    Iannarelli, Michael A. Nachbaur, Michael A. Puls II<!--Shadow2531-->,
    Michael Gratton, Michael Powers, Michel Fortin, Mihai
-   &#x015E;ucan<!-- from ROBO Design -->, Mike Brown, Mike
+   &#x015E;ucan<!-- from ROBO
+  Design -->, Mike Brown, Mike
    Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike Schinkel, Mike Shaver,
    Mikko Rantalainen, Neil Deakin, Olav Junker Kjær, Philip Taylor,
    Rajas Moonka, Rimantas Liubertas, Robert O'Callahan, Robert Sayre, Roman

Modified: source
===================================================================
--- source	2007-10-17 07:36:12 UTC (rev 1063)
+++ source	2007-10-17 22:53:57 UTC (rev 1064)
@@ -27848,11 +27848,15 @@
 
 interface <dfn>Database</dfn> {
   readonly attribute DOMString <span title="dom-database-version">version</span>;
-  bool <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion);
+  void <span title="dom-database-changeVersion">changeVersion</span>(in DOMString oldVersion, in DOMString newVersion, in <span>VersionChangeCallback</span> callback);
   void <span title="dom-database-executeSql">executeSql</span>(in DOMString sqlStatement, in <span>ObjectArray</span> arguments, in <span>SQLCallback</span> callback);
   void <span title="dom-database-closeTransaction">closeTransaction</span>();
 };
 
+interface <dfn>VersionChangeCallback</dfn> {
+  void <span title="dom-versionchangecallback-handleEvent">handleEvent</span>(in bool versionChanged);
+};
+
 interface <dfn>SQLCallback</dfn> {
   void <span title="dom-sqlcallback-handleEvent">handleEvent</span>(in <span>SQLResultSet</span> resultSet);
 };</pre>
@@ -27868,19 +27872,22 @@
   <p>The <dfn
   title="dom-database-changeVersion">changeVersion()</span></dfn>
   method allows you to atomically verify the version number and change
-  it. When the method is invoked, the user agent must obtain a full
-  lock of the database (waiting for all open transactions to be
-  closed), and then must verify that the current version of the
-  database matches the first argument to the method. If it does not
-  match, then the user agent must release the lock and return
-  false. Otherwise, the current version matches the first argument,
-  and the user agent must change the current version of the database
-  and the <span title="concept-database-expected-version">expected
-  version</span> of the <code>Database</code> object on which the
-  method was invoked to the value of the second argument. Then, the
-  lock must be released. Any <code>Database</code> instances that have
-  an expected version that differs from the new version will start
-  failing at this point. Finally, the method must return true.</p>
+  it. When the method is invoked, it must immediately return, and then
+  the user agent must obtain a full lock of the database (waiting for
+  all open transactions to be closed), and then must verify that the
+  current version of the database matches the first argument to the
+  method. If it does not match, then the user agent must release the
+  lock and invoke the callback argument with the value false as the
+  callback's argument. Otherwise, the current version matches the
+  first argument, and the user agent must change the current version
+  of the database and the <span
+  title="concept-database-expected-version">expected version</span> of
+  the <code>Database</code> object on which the method was invoked to
+  the value of the second argument. Then, the lock must be
+  released. Any <code>Database</code> instances that have an expected
+  version that differs from the new version will start failing at this
+  point. Finally, the method must invoke its callback argument with
+  the value true as the callback's argument.</p>
 
 
 
@@ -40707,43 +40714,44 @@
   Andrew Gove, Andrew Sidwell, Anne van Kesteren, Anthony Hickson,
   Asbjørn Ulsberg, Ben Godfrey, Ben Meadowcroft, Benjamin
   Hawkes-Lewis, Bert Bos, Bjoern Hoehrmann, Boris Zbarsky, Brad Fults,
-  Brad Neuberg, Brendan Eich, Brett Wilson, Carlos Perelló
-  Marín, Chao Cai, &#xc724;&#xc11d;&#xcc2c; (Channy Yun), Charl
-  van Niekerk<!--status.whatwg.org maintainer-->, Charles Iliya
-  Krempeaux, Charles McCathieNevile, Christian Biesinger, Christian
-  Johansen, Chriswa, Daniel Peng, Daniel Spång, Darin Alder,
-  Darin Fisher, Dave Singer, Dave Townsend<!-- Mossop on moz irc -->,
-  David Baron, David Flanagan, David Håsäther, David Hyatt,
-  Derek Featherstone, Dimitri Glazkov, dolphinling, Doron Rosenberg,
-  Eira Monstad, Elliotte Harold, Erik Arvidsson, Evan Martin,
-  fantasai, Franck 'Shift' Quélain, Geoffrey Sneddon,
-  Håkon Wium Lie, Henri Sivonen, Henrik Lied, Ignacio Javier,
-  J. King, James Graham, James M Snell, James Perrett, Jan-Klaas
-  Kollhof, Jasper Bryant-Greene, Jeff Cutsinger, Jeff Walden, Jens
-  Bannmann, Jeroen van der Meer, Joel Spolsky, John Boyer, John
-  Harding, Johnny Stenback, Jon Perlow, Jonathan Worent, Jorgen
-  Horstink, Josh Levenberg, Joshua Randall, Jukka K. Korpela, Kai
-  Hendry, <!-- Keryx Web, = Lars Gunther --> Kornel Lesinski,
-  &#x9ed2;&#x6fa4;&#x525b;&#x5fd7; (KUROSAWA Takeshi), Kristof
-  Zelechovski, Lachlan Hunt, Larry Page, Lars Gunther, Laurens Holst,
-  Lenny Domnitser, Léonard Bouchet, Leons Petrazickis,
-  Logan<!-- on moz irc -->, Loune, Maciej Stachowiak, Malcolm Rowe,
-  Mark Nottingham, Mark Rowe<!--bdash-->, Mark Schenk, Martijn
-  Wargers, Martin Atkins, Martin Honnen, Mathieu Henri, Matthew
-  Mastracci, Matthew Raymond, Matthew Thomas, Mattias Waldau, Max
-  Romantschuk, Michael 'Ratt' Iannarelli, Michael A. Nachbaur, Michael
-  A. Puls II<!--Shadow2531-->, Michael Gratton, Michael Powers, Michel
-  Fortin, Mihai &#x015E;ucan<!-- from ROBO Design -->, Mike Brown,
-  Mike Dierken<!-- S. Mike Dierken -->, Mike Dixon, Mike Schinkel,
-  Mike Shaver, Mikko Rantalainen, Neil Deakin, Olav Junker Kjær,
-  Philip Taylor, Rajas Moonka, Rimantas Liubertas, Robert O'Callahan,
-  Robert Sayre, Roman Ivanov, S. Mike Dierken, Sam Ruby, Sam Weinig,
-  Scott Hess, Sean Knapp, Shaun Inman, Silvia Pfeiffer, Simon Pieters,
-  Stefan Haustein, Stephen Ma, Steve Runyon, Steven Garrity, Stewart
-  Brodie, Stuart Parmenter, Tantek Çelik, Thomas Broyer, Thomas
-  O'Connor, Tim Altman, Vladimir Vuki&#x0107;evi&#x0107;, Wakaba,
-  William Swanson, Øistein E. Andersen, and everyone on the
-  WHATWG mailing list for their useful and substantial comments.</p>
+  Brad Neuberg, Brady Eidson, Brendan Eich, Brett Wilson, Carlos
+  Perelló Marín, Chao Cai, &#xc724;&#xc11d;&#xcc2c;
+  (Channy Yun), Charl van Niekerk<!--status.whatwg.org maintainer-->,
+  Charles Iliya Krempeaux, Charles McCathieNevile, Christian
+  Biesinger, Christian Johansen, Chriswa, Daniel Peng, Daniel
+  Spång, Darin Alder, Darin Fisher, Dave Singer, Dave
+  Townsend<!-- Mossop on moz irc -->, David Baron, David Flanagan,
+  David Håsäther, David Hyatt, Derek Featherstone, Dimitri
+  Glazkov, dolphinling, Doron Rosenberg, Eira Monstad, Elliotte
+  Harold, Erik Arvidsson, Evan Martin, fantasai, Franck 'Shift'
+  Quélain, Geoffrey Sneddon, Håkon Wium Lie, Henri
+  Sivonen, Henrik Lied, Ignacio Javier, J. King, James Graham, James M
+  Snell, James Perrett, Jan-Klaas Kollhof, Jasper Bryant-Greene, Jeff
+  Cutsinger, Jeff Walden, Jens Bannmann, Jeroen van der Meer, Joel
+  Spolsky, John Boyer, John Harding, Johnny Stenback, Jon Perlow,
+  Jonathan Worent, Jorgen Horstink, Josh Levenberg, Joshua Randall,
+  Jukka K. Korpela, Kai Hendry, <!-- Keryx Web, = Lars Gunther -->
+  Kornel Lesinski, &#x9ed2;&#x6fa4;&#x525b;&#x5fd7; (KUROSAWA
+  Takeshi), Kristof Zelechovski, Lachlan Hunt, Larry Page, Lars
+  Gunther, Laurens Holst, Lenny Domnitser, Léonard Bouchet,
+  Leons Petrazickis, Logan<!-- on moz irc -->, Loune, Maciej
+  Stachowiak, Malcolm Rowe, Mark Nottingham, Mark Rowe<!--bdash-->,
+  Mark Schenk, Martijn Wargers, Martin Atkins, Martin Honnen, Mathieu
+  Henri, Matthew Mastracci, Matthew Raymond, Matthew Thomas, Mattias
+  Waldau, Max Romantschuk, Michael 'Ratt' Iannarelli, Michael
+  A. Nachbaur, Michael A. Puls II<!--Shadow2531-->, Michael Gratton,
+  Michael Powers, Michel Fortin, Mihai &#x015E;ucan<!-- from ROBO
+  Design -->, Mike Brown, Mike Dierken<!-- S. Mike Dierken -->, Mike
+  Dixon, Mike Schinkel, Mike Shaver, Mikko Rantalainen, Neil Deakin,
+  Olav Junker Kjær, Philip Taylor, Rajas Moonka, Rimantas
+  Liubertas, Robert O'Callahan, Robert Sayre, Roman Ivanov, S. Mike
+  Dierken, Sam Ruby, Sam Weinig, Scott Hess, Sean Knapp, Shaun Inman,
+  Silvia Pfeiffer, Simon Pieters, Stefan Haustein, Stephen Ma, Steve
+  Runyon, Steven Garrity, Stewart Brodie, Stuart Parmenter, Tantek
+  Çelik, Thomas Broyer, Thomas O'Connor, Tim Altman, Vladimir
+  Vuki&#x0107;evi&#x0107;, Wakaba, William Swanson, Øistein
+  E. Andersen, and everyone on the WHATWG mailing list for their
+  useful and substantial comments.</p>
 
   <p>Special thanks to Richard Williamson for creating the first
   implementation of <code>canvas</code> in Safari, from which the




More information about the Commit-Watchers mailing list