Bug 1389314 Part4: Disable the input priority event when shutting down. r=smaug.

MozReview-Commit-ID: CWV1kr3xMQL
This commit is contained in:
Stone Shih 2017-08-02 16:53:04 +08:00
Родитель fca19b3588
Коммит 3c63a111d2
1 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -1389,12 +1389,15 @@ ContentParent::ShutDownProcess(ShutDownMethod aMethod)
// other methods. We first call Shutdown() in the child. After the child is
// ready, it calls FinishShutdown() on us. Then we close the channel.
if (aMethod == SEND_SHUTDOWN_MESSAGE) {
if (mIPCOpen && !mShutdownPending && SendShutdown()) {
mShutdownPending = true;
// Start the force-kill timer if we haven't already.
StartForceKillTimer();
if (mIPCOpen && !mShutdownPending) {
// Stop sending input events with input priority when shutting down.
SetInputPriorityEventEnabled(false);
if (SendShutdown()) {
mShutdownPending = true;
// Start the force-kill timer if we haven't already.
StartForceKillTimer();
}
}
// If call was not successful, the channel must have been broken
// somehow, and we will clean up the error in ActorDestroy.
return;