[webkit-dev] WTF::callOnMainThread() and re-entrancy
Alexey Proskuryakov
ap at webkit.org
Mon Mar 8 11:38:55 PST 2010
On 08.03.2010, at 11:21, Drew Wilson wrote:
> So, my question is: does it surprise anyone that tasks posted via
> callOnMainThread() are getting executed even though there's a modal
> dialog shown? And is there anything I should be doing in my task
> handler to make sure we aren't re-entering JS execution
> inappropriately in these cases? I'm just concerned that the way
> we're posting tasks from worker threads to the main thread may cause
> reentrancy problems.
It is not correct to deliver messages from worker threads when an
alert or a modal window is displayed. It may be ok for modal dialogs
that are triggered asynchronously (such as credentials dialog).
We have a manual test regression for a related issue, WebCore/manual-
tests/js-timers-beneath-modal-dialog.html. You can compare how timers
work, and how worker messages are delivered to find out how to fix the
problem.
- WBR, Alexey Proskuryakov
More information about the webkit-dev
mailing list