Commit graph

2 commits

Author SHA1 Message Date
Boris Zbarsky
fee88c0518 Bug 1167575. Ensure that we don't exit modal state while we're still waiting on a Gecko runnable in the event-loop-spinning code in nsPrompter.js. r=dolske
If we synchronously shut down the prompt, that will exit modal state while we're
still processing our mouse or key event, which happens _before_ Gecko runnable
processing.  Exiting modal state will generally post a runnable to run timeouts,
so we can end up processing that runnable before we return from processNextEvent
and unwind to whatever code did the alert() call on the web page.  The upshot is
that the webpage will see timeouts fire before the alert() call returns.

If we exit modal state off a Gecko runnable instead, that will ensure that we
return to the nsPrompter code immediately after exiting modal state, see that
the prompt is no longer active, and return to the calling web page code _before_
processing any more runnables.
2016-09-01 21:31:22 -04:00
Timothy Guan-tin Chien
b7fa00b590 Bug 1266611 - Multiple tab prompts should not overlap, r=gijs
MozReview-Commit-ID: 6wjdoiR38Wb

--HG--
rename : browser/base/content/test/general/openPromptOffTimeout.html => browser/base/content/test/tabPrompts/openPromptOffTimeout.html
extra : rebase_source : dab1ec206a4f511f7bdf2108ed22d73d0df4c4c7
2016-05-21 21:13:10 +08:00