webstorage/Overview.html 1.11 2899 Block concurrent access to .cookie a

Block concurrent access to .cookie and .localStorage using the storage
mutex. (whatwg r2899)

When the setItem(), removeItem(), and clear() methods are called on a Storage object x that is associated with a local storage area, if the methods did something, then in every HTMLDocument object whose Window object's localStorage attribute's Storage object is associated with the same storage area, other than x, a storage event must be fired, as described below.
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#localStorageEvent
Whenever the properties of a localStorage attribute's Storage object are to be examined, returned, set, or deleted, whether as part of a direct property access, when checking for the presence of a property, during property enumeration, when determining the number of properties present, or as part of the execution of any of the methods or attributes defined on the Storage interface. the user agent must first obtain the storage mutex.
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#localStorageMutex
3.5 The storage event
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#the-storage-event
storage
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#event-storage
3.6 Threads
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#threads
4 Database storage
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#sql
source
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#dom-storageevent-source
storageArea
http://people.w3.org/mike/diffs/html5/webstorage/Overview.1.11.html#dom-storageevent-storagearea

http://people.w3.org/mike/diffs/html5/webstorage/Overview.diff.html
http://dev.w3.org/cvsweb/html5/webstorage/Overview.html?r1=1.10&r2=1.11&f=h
http://html5.org/tools/web-apps-tracker?from=2898&to=2899

===================================================================
RCS file: /sources/public/html5/webstorage/Overview.html,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Overview.html 24 Mar 2009 02:12:38 -0000 1.10
+++ Overview.html 24 Mar 2009 08:15:28 -0000 1.11
@@ -502,7 +502,14 @@
   every <code>HTMLDocument</code> object whose <code>Window</code>
   object's <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code>
   attribute's <code><a href=#storage-0>Storage</a></code> object is associated with the same
-  storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.<h3 id=the-storage-event><span class=secno>3.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h3><!-- XXX fix up for workers: target is wrong, source and storageArea
+  storage area, other than <var title="">x</var>, a <code title=event-storage><a href=#event-storage>storage</a></code> event must be fired, as <a href=#event-storage title=event-storage>described below</a>.<p id=localStorageMutex>Whenever the properties of a <code title=dom-localStorage><a href=#dom-localstorage>localStorage</a></code> attribute's
+  <code><a href=#storage-0>Storage</a></code> object are to be examined, returned, set, or
+  deleted, whether as part of a direct property access, when checking
+  for the presence of a property, during property enumeration, when
+  determining the number of properties present, or as part of the
+  execution of any of the methods or attributes defined on the
+  <code><a href=#storage-0>Storage</a></code> interface. the user agent must first
+  <span>obtain the storage mutex</span>.<h3 id=the-storage-event><span class=secno>3.5 </span>The <code title=event-storage><a href=#event-storage>storage</a></code> event</h3><!-- XXX fix up for workers: target is wrong, source and storageArea
   definitions are wrong --><p>The <dfn id=event-storage title=event-storage><code>storage</code></dfn> event
   is fired when a storage area changes, as described in the previous
   two sections (<a href=#sessionStorageEvent>for session
@@ -552,23 +559,14 @@
   represents the <code>WindowProxy</code> object of the <span>browsing
   context</span> of the document whose key changed.<p>The <dfn id=dom-storageevent-storagearea title=dom-StorageEvent-storageArea><code>storageArea</code></dfn>
   attribute represents the <code><a href=#storage-0>Storage</a></code> object that was
-  affected.<h3 id=threads><span class=secno>3.6 </span>Threads</h3><p>Multiple browsing contexts must be able to access the local
-  storage areas simultaneously in such a manner that scripts cannot
-  detect any concurrent script execution.<p>This is required to guarantee that the <code title=dom-Storage-length><a href=#dom-storage-length>length</a></code> attribute of a
-  <code><a href=#storage-0>Storage</a></code> object never changes while a script is
+  affected.<h3 id=threads><span class=secno>3.6 </span>Threads</h3><p>Because of <a href=#localStorageMutex>the use</a> of the
+  <span>storage mutex</span>, multiple browsing contexts will be able
+  to access the local storage areas simultaneously in such a manner
+  that scripts cannot detect any concurrent script execution.<p>Thus, the <code title=dom-Storage-length><a href=#dom-storage-length>length</a></code>
+  attribute of a <code><a href=#storage-0>Storage</a></code> object, and the value of the
+  various properties of that object, cannot change while a script is
   executing, other than in a way that is predictable by the script
-  itself.<p class=note>There are various ways of implementing this
-  requirement. One is to just have one <span>event loop</span> for all
-  <span title="browsing context">browsing contexts</span>. Another is
-  that if a script running in one browsing context accesses a storage
-  area, the user agent blocks scripts in other browsing contexts when
-  they try to access the same storage area until the <span>event
-  loop</span> running the first script has completed running the task
-  that started that script. Another (potentially more efficient but
-  certainly more complex) implementation strategy is to use optimistic
-  transactional script execution. This specification does not require
-  any particular implementation strategy, so long as the requirement
-  above is met.<h2 id=sql><span class=secno>4 </span>Database storage</h2><!-- Feature requests for future versions (v2):
+  itself.<h2 id=sql><span class=secno>4 </span>Database storage</h2><!-- Feature requests for future versions (v2):
         * deleting databases
         * determining how much storage room is left
         * handling the database getting corrupted

Received on Tuesday, 24 March 2009 08:16:27 UTC