W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2009

[whatwg] Application defined "locks"

From: Darin Fisher <darin@chromium.org>
Date: Wed, 9 Sep 2009 22:07:39 -0700
Message-ID: <bd8f24d20909092207g1b13f668m386838fec489037e@mail.gmail.com>
On Wed, Sep 9, 2009 at 10:03 PM, Aaron Boodman <aa at google.com> wrote:

> On Wed, Sep 9, 2009 at 9:13 PM, Darin Fisher<darin at chromium.org> wrote:
> > If I call showModalDialog from within a database transaction, and then
> > showModalDialog
> > tries to create another database transaction, should I expect that the
> > transaction
> > can be started within the nested run loop of the modal dialog?
>
> By definition, in that case, the second transaction would not start
> until the dialog was closed.
>
>
Good, but....



> > If not, then it may cause
> > the app to get confused and never allow the dialog to be closed (e.g.,
> > perhaps the close
> > action is predicated on a database query.)
>
> That is true, but it is an easily reproducible, deterministic
> application bug. It also doesn't destabilize the environment -- by
> making tabs or dialogs unclosable or whatever.
>

Well, the problem is that the creator of the transaction and the code
associated with the showModalDialog call may not be related.  The
showModalDialog code might normally be used outside the context of a
transaction, in which case the code would normally work fine.  However, if
triggered from within a transaction, the dialog would be stuck.

-Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090909/b2fa478b/attachment.htm>
Received on Wednesday, 9 September 2009 22:07:39 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:52 UTC