- From: Ian Hickson via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 16 Sep 2009 22:16:30 +0000
- To: public-html-commits@w3.org
Update of /sources/public/html5/webstorage In directory hutz:/tmp/cvs-serv1580 Modified Files: Overview.html Log Message: Setting document.domain has to make localStorage unusable because otherwise you can cause deadlocks with per-origin localStorage locks (whatwg r3878) Index: Overview.html =================================================================== RCS file: /sources/public/html5/webstorage/Overview.html,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- Overview.html 16 Sep 2009 00:10:14 -0000 1.78 +++ Overview.html 16 Sep 2009 22:16:28 -0000 1.79 @@ -518,14 +518,22 @@ for security reasons or when requested to do so by the user. User agents should always avoid deleting data while a script that could access that data is running.<p>When the <code title="dom-localStorage"><a href="#dom-localstorage">localStorage</a></code> - attribute is accessed, the user agent must check to see if it has - allocated a local storage area for the <span>origin</span> of the - <code>Document</code> of the <code>Window</code> object on which the - method was invoked. If it has not, a new storage area for that - <span>origin</span> must be created.<p>The user agent must then return the <code><a href="#storage-0">Storage</a></code> object - associated with that origin's local storage area. Each - <code>Document</code> object must have a separate object for its - <code>Window</code>'s <code title="dom-localStorage"><a href="#dom-localstorage">localStorage</a></code> attribute.<p id="localStorageEvent">When the <code title="dom-Storage-setItem"><a href="#dom-storage-setitem">setItem()</a></code>, <code title="dom-Storage-removeItem"><a href="#dom-storage-removeitem">removeItem()</a></code>, and <code title="dom-Storage-clear"><a href="#dom-storage-clear">clear()</a></code> methods are called on a + attribute is accessed, the user agent must run the following steps:<ol><li><p>If the <code>Document</code>'s <span>effective script + origin</span> is not the <span>same origin</span> as the + <code>Document</code>'s <span>origin</span>, then throw a + <code>SECURITY_ERR</code> exception and abort these steps.</li> + + <li><p>Check to see if the user agent has allocated a local storage + area for the <span>origin</span> of the <code>Document</code> of + the <code>Window</code> object on which the method was invoked. If + it has not, create a new storage area for that + <span>origin</span>.</li> + + <li><p>Return the <code><a href="#storage-0">Storage</a></code> object associated with that + origin's local storage area. Each <code>Document</code> object must + have a separate object for its <code>Window</code>'s <code title="dom-localStorage"><a href="#dom-localstorage">localStorage</a></code> attribute.</p> + + </ol><p id="localStorageEvent">When the <code title="dom-Storage-setItem"><a href="#dom-storage-setitem">setItem()</a></code>, <code title="dom-Storage-removeItem"><a href="#dom-storage-removeitem">removeItem()</a></code>, and <code title="dom-Storage-clear"><a href="#dom-storage-clear">clear()</a></code> methods are called on a <code><a href="#storage-0">Storage</a></code> object <var title="">x</var> that is associated with a local storage area, if the methods did something, then in every <code>HTMLDocument</code> object whose <code>Window</code>
Received on Wednesday, 16 September 2009 22:16:39 UTC