- From: Ian Hickson <ian@hixie.ch>
- Date: Mon, 6 Apr 2009 08:38:43 +0000 (UTC)
On Mon, 6 Apr 2009, Darin Fisher wrote: > > In addition to alert(), don't forget about all the great state changing > things that can happen to the cookie database (and other data stores) > during a synchronous XMLHttpRequest (or synchronous document.load) in > Firefox. Maybe those are just bugs? The HTML5 spec says the storage mutex is released when alert() is called. I've asked Anne (editor of the XHR spec) to say that it is released when a sync XHR is started, too. Per the HTML5 spec, setting the cookies from the network grabs the storage mutex briefly. (Reading them is implicitly atomic, but might happen while someone else holds the mutex, so per spec there is still a chance of the cookies sent to the server being in an inconsistent state if they are read while a script is in the middle of a multi-stage cookie update.) I don't really mind if the spec says whether cookies should be protected by the storage mutex or not (the spec says they should be because that seems to be the majority opinion). I'm pretty sure localStorage should be so protected, though. I don't really see how to get away from that. -- Ian Hickson U+1047E )\._.,--....,'``. fL http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,. Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
Received on Monday, 6 April 2009 01:38:43 UTC