<div class="gmail_quote">On Wed, Sep 9, 2009 at 10:03 PM, Aaron Boodman <span dir="ltr"><<a href="mailto:aa@google.com">aa@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Wed, Sep 9, 2009 at 9:13 PM, Darin Fisher<<a href="mailto:darin@chromium.org">darin@chromium.org</a>> wrote:<br>
> If I call showModalDialog from within a database transaction, and then<br>
> showModalDialog<br>
> tries to create another database transaction, should I expect that the<br>
> transaction<br>
> can be started within the nested run loop of the modal dialog?<br>
<br>
</div>By definition, in that case, the second transaction would not start<br>
until the dialog was closed.<br>
<div class="im"><br></div></blockquote><div><br></div><div>Good, but....</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">
> If not, then it may cause<br>
> the app to get confused and never allow the dialog to be closed (e.g.,<br>
> perhaps the close<br>
> action is predicated on a database query.)<br>
<br>
</div>That is true, but it is an easily reproducible, deterministic<br>
application bug. It also doesn't destabilize the environment -- by<br>
making tabs or dialogs unclosable or whatever.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>-Darin</div></div>