gecko-dev/ipc/chromium
Gerald Squelart 22a7a23613 Bug 1530419 - Move PROFILER_AUTO_THREAD_SLEEP into WinUtils::WaitForMessage from callers - r=mstange
Both `nsAppShell::ProcessNextNativeEvent()` and `MessagePumpForUI::WaitForWork()` have a `PROFILER_AUTO_THREAD_SLEEP` surrounding the `mozilla::widget::WinUtils::WaitForMessage()` call.
However inside `WaitForMessage()` the call to `PeekMessageW()` may trigger a sequence of events (because the system delivers pending messages) that end in the initialization of a new thread, which invokes `ReentrantMonitor::Wait()` where there is a `PROFILER_AUTO_THREAD_SLEEP`.

To avoid this recursion, this patch moves `PROFILER_AUTO_THREAD_SLEEP` from both callers into `WaitForMessage()` to only enclose the actual potentially-sleeping operation `::MsgWaitForMultipleObjectsEx()`.

Differential Revision: https://phabricator.services.mozilla.com/D72850
2020-04-28 16:22:13 +00:00
..
src Bug 1530419 - Move PROFILER_AUTO_THREAD_SLEEP into WinUtils::WaitForMessage from callers - r=mstange 2020-04-28 16:22:13 +00:00
chromium-config.mozbuild Bug 1619460 - ensure subsequent runs of ./mach build-backend under Python 3 produce consistent results r=dmajor 2020-03-12 21:05:26 +00:00
moz.build Bug 1575420 - Replace MOZ_WIDGET_TOOLKIT value of "gtk3" with "gtk". r=froydnj 2019-08-21 12:25:42 +00:00