Bug 1362284 - Assign the background thread before flushing pending events at GamepadEventChannelParent; r=Lenzak
authorDaosheng Mu <daoshengmu@gmail.com>
Fri, 05 May 2017 01:21:39 +0800
changeset 356581 f4e34d6481e811353d84fe8f7b5f26dd23924a4d
parent 356580 8c42bea0b7fa3f1414493286d57a0c18bdc16dd6
child 356582 7bd313d7e80eb2a0316b12569f5269a7a8659c38
push id31767
push usercbook@mozilla.com
push dateFri, 05 May 2017 13:15:58 +0000
treeherdermozilla-central@8872ad4d52b6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersLenzak
bugs1362284
milestone55.0a1
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
Bug 1362284 - Assign the background thread before flushing pending events at GamepadEventChannelParent; r=Lenzak MozReview-Commit-ID: FcnAM1JSON2
dom/gamepad/ipc/GamepadEventChannelParent.cpp
--- a/dom/gamepad/ipc/GamepadEventChannelParent.cpp
+++ b/dom/gamepad/ipc/GamepadEventChannelParent.cpp
@@ -40,18 +40,18 @@ class SendGamepadUpdateRunnable final : 
 } // namespace
 
 GamepadEventChannelParent::GamepadEventChannelParent()
   : mHasGamepadListener(false)
 {
   RefPtr<GamepadPlatformService> service =
     GamepadPlatformService::GetParentService();
   MOZ_ASSERT(service);
+  mBackgroundThread = NS_GetCurrentThread();
   service->AddChannelParent(this);
-  mBackgroundThread = NS_GetCurrentThread();
 }
 
 mozilla::ipc::IPCResult
 GamepadEventChannelParent::RecvGamepadListenerAdded()
 {
   AssertIsOnBackgroundThread();
   MOZ_ASSERT(!mHasGamepadListener);
   mHasGamepadListener = true;