Backed out changeset 7755e3c5ce0a (bug 1351148)
authorStone Shih <sshih@mozilla.com>
Fri, 11 Aug 2017 15:18:50 +0800
changeset 374243 67c7b294ee26cb2a1f98ca7d6f5dfadc8dc205b8
parent 374242 f9409f89fc4176da5c1f8ce773daa286111ec0e2
child 374244 f6bb01f04d7f907dacc509d90f7ce5a1e3c172b6
push id32318
push userkwierso@gmail.com
push dateFri, 11 Aug 2017 20:16:01 +0000
treeherdermozilla-central@80ff3f300e05 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1351148
milestone57.0a1
backs out7755e3c5ce0ad2d0ed9a6cb8477155fd989d6b2d
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 7755e3c5ce0a (bug 1351148)
xpcom/threads/nsThread.cpp
--- a/xpcom/threads/nsThread.cpp
+++ b/xpcom/threads/nsThread.cpp
@@ -945,17 +945,27 @@ nsThread::nsChainedEventQueue::PutEvent(
   case nsIRunnablePriority::PRIORITY_INPUT:
     if (mIsInputPrioritizationEnabled) {
       mInputQueue->PutEvent(event.forget(), aProofOfLock);
     } else {
       mNormalQueue->PutEvent(event.forget(), aProofOfLock);
     }
     break;
   case nsIRunnablePriority::PRIORITY_HIGH:
-    mHighQueue->PutEvent(event.forget(), aProofOfLock);
+    if (mIsInputPrioritizationEnabled) {
+      mHighQueue->PutEvent(event.forget(), aProofOfLock);
+    } else {
+      // During startup, ContentParent sends SetXPCOMProcessAttributes to
+      // initialize ContentChild and enable input event prioritization. After
+      // that, ContentParent sends PBrowserConstructor to create PBrowserChild.
+      // To prevent PBrowserConstructor preempt SetXPCOMProcessAttributes and
+      // cause problems, we have to put high priority events in mNormalQueue to
+      // keep the correct order of initialization.
+      mNormalQueue->PutEvent(event.forget(), aProofOfLock);
+    }
     break;
   default:
     MOZ_ASSERT(false);
     break;
   }
 }
 
 //-----------------------------------------------------------------------------