зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1157908 - Give Gecko thread Looper low priority; r=snorp
This commit is contained in:
Родитель
28a06e03b9
Коммит
23ba47d9f1
|
@ -23,10 +23,6 @@
|
||||||
#include "nsXULAppAPI.h"
|
#include "nsXULAppAPI.h"
|
||||||
#include "prthread.h"
|
#include "prthread.h"
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
#include "AndroidBridge.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_NUWA_PROCESS
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
#include "ipc/Nuwa.h"
|
#include "ipc/Nuwa.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -105,15 +101,6 @@ MessagePump::Run(MessagePump::Delegate* aDelegate)
|
||||||
// equal priority, we sensitively rely on processing exactly one
|
// equal priority, we sensitively rely on processing exactly one
|
||||||
// Task per DoWorkRunnable XPCOM event.
|
// Task per DoWorkRunnable XPCOM event.
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_ANDROID
|
|
||||||
// This processes messages in the Android Looper. Note that we only
|
|
||||||
// get here if the normal Gecko event loop has been awoken above.
|
|
||||||
// Bug 750713
|
|
||||||
if (MOZ_LIKELY(AndroidBridge::HasEnv())) {
|
|
||||||
did_work |= mozilla::widget::GeckoAppShell::PumpMessageLoop();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
did_work |= aDelegate->DoDelayedWork(&delayed_work_time_);
|
did_work |= aDelegate->DoDelayedWork(&delayed_work_time_);
|
||||||
|
|
||||||
if (did_work && delayed_work_time_.is_null()
|
if (did_work && delayed_work_time_.is_null()
|
||||||
|
|
|
@ -243,6 +243,15 @@ nsAppShell::ProcessNextNativeEvent(bool mayWait)
|
||||||
|
|
||||||
curEvent = PopNextEvent();
|
curEvent = PopNextEvent();
|
||||||
if (!curEvent && mayWait) {
|
if (!curEvent && mayWait) {
|
||||||
|
// This processes messages in the Android Looper. Note that we only
|
||||||
|
// get here if the normal Gecko event loop has been awoken
|
||||||
|
// (bug 750713). Looper messages effectively have the lowest
|
||||||
|
// priority because we only process them before we're about to
|
||||||
|
// wait for new events.
|
||||||
|
if (widget::GeckoAppShell::PumpMessageLoop()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait",
|
PROFILER_LABEL("nsAppShell", "ProcessNextNativeEvent::Wait",
|
||||||
js::ProfileEntry::Category::EVENTS);
|
js::ProfileEntry::Category::EVENTS);
|
||||||
mozilla::HangMonitor::Suspend();
|
mozilla::HangMonitor::Suspend();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче