On Wed, Aug 19, 2009 at 11:26 AM, Jeremy Orlow <span dir="ltr"><<a href="mailto:jorlow@chromium.org">jorlow@chromium.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
First of all, I was wondering why all user prompts are specified as "must release the storage mutex" (<a href="http://dev.w3.org/html5/spec/Overview.html#user-prompts" target="_blank">http://dev.w3.org/html5/spec/Overview.html#user-prompts</a>). Should this really say "must" instead of "may"? IIRC (I couldn't find the original thread, unfortunately) this was added because of deadlock concerns. It seems like there might be some UA implementation specific ways this could deadlock and there is the question of whether we'd want an alert() while holding the lock to block other execution requiring the lock, but I don't see why the language should be "must". For Chromium, I don't think we'll need to release the lock for any of these, unless there's some deadlock scenario I'm missing here.</blockquote>
<div><br>So if one page grabs the lock and then does an alert(), and another page in the same domain tries to get the lock, you're going to let the latter page hang until the user dismisses the alert in the first page?<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div>Given that different UAs are probably going to have other scenarios where they have to drop the lock (some of them may even be purely implementational issues), should we add some way for us to notify scripts the lock was dropped? A normal event isn't going to be of much use, since it'll fire after the scripts execution ends (so the lock would have been dropped by then anyway). A boolean doesn't seem super useful, but it's better than nothing and could help debugging. Maybe fire an exception? Are there other options?</div>
</blockquote><div><br>A generation counter might be useful.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div></div>
<div>Lastly, is navigator.getStorageUpdates() the right name for the function that drops the lock? Why was it changed from navigator.releaseLock()? I assume we're trying to avoid the word "lock", but the reason why you'd need to call a function to get updates is not clear without understanding the concept of a lock...so what's the point of making this so cryptic?</div>
</blockquote><div><br>Authors would be confused that there's no aquireLock() API.<br><br></div></div>Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>