[whatwg] Application defined "locks"

Darin Fisher darin at chromium.org
Wed Sep 9 22:07:39 PDT 2009


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-0002.htm>


More information about the whatwg mailing list