<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 25, 2009, at 7:46 AM, Jeremy Orlow wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">On Wed, Nov 25, 2009 at 6:20 AM, Ian Hickson <span dir="ltr"><<a href="mailto:ian@hixie.ch">ian@hixie.ch</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> On Wed, 4 Nov 2009, Rob Ennals wrote:<br> ><br> > How about this for a solution for the localStorage mutex problem: [...]<br> <br> Here's a proposal based on the recent feedback:<br> <br> * There is a per-origin mutex. It can be owned by either an event loop<br>  task or a network layer task.<br> <br> * Things that wait until their task owns the storage mutex:<br>   - script fetching document.cookie<br>   - script setting document.cookie<br>   - script reading or writing a property of, or calling a method on, or<br>     enumerating the properties of, the localStorage object<br>   - the network layer setting cookies<br> <br> * Things that release the storage mutex if their task owns it:<br>   - the network layer after it has set cookies<br>   - script calling a method implemented in native code on a host object<br></blockquote><div><br></div><div>Is this a may or a must?  As discussed, a may will result in different behaviors and strange bugs when someone develops on one browser and then tries to run their script on a different version of that browser or different browsers since they will probably have subtly different cases when they'll need to release the lock.  If it's a must, then we'll take a small hit in all of our script binding code, but things will be more interoperable.</div></div></blockquote><div><br></div><div>Is there any observable difference between a "may" and a "must" (assuming the implementation has avoided deadlocks)? Dropping the mutex will just remove a guarantee, it won't force different behavior. You can still get lucky. Indeed, in a browser that only uses a single thread/process to render Web content, if you're not using workers you will always get lucky.</div><div><br></div></div>Regards,<div>Maciej</div><div><br></div></body></html>