Bug 1319850 - part 2, Update MessageLoop so that it supports MessagePumpForAndroidUI r=nfroyd
authorRandall Barker <rbarker@mozilla.com>
Wed, 30 Nov 2016 14:58:38 -0800
changeset 327220 7f1ec68f6e5b1f778bbf63ac9a0ed19c958d4471
parent 327219 ab1843cc574e33893ac6284e81be8ebf1096926b
child 327221 7b28041341d67fbb0d4123daa326389953e9c04b
push id31122
push userphilringnalda@gmail.com
push dateSun, 25 Dec 2016 00:51:37 +0000
treeherdermozilla-central@1156db49e976 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnfroyd
bugs1319850
milestone53.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 1319850 - part 2, Update MessageLoop so that it supports MessagePumpForAndroidUI r=nfroyd
ipc/chromium/src/base/message_loop.cc
ipc/chromium/src/base/message_loop.h
--- a/ipc/chromium/src/base/message_loop.cc
+++ b/ipc/chromium/src/base/message_loop.cc
@@ -125,16 +125,22 @@ MessageLoop::MessageLoop(Type type, nsIT
   case TYPE_MOZILLA_NONMAINTHREAD:
     pump_ = new mozilla::ipc::MessagePumpForNonMainThreads(aThread);
     return;
 #if defined(OS_WIN)
   case TYPE_MOZILLA_NONMAINUITHREAD:
     pump_ = new mozilla::ipc::MessagePumpForNonMainUIThreads(aThread);
     return;
 #endif
+#if defined(MOZ_WIDGET_ANDROID)
+  case TYPE_MOZILLA_ANDROID_UI:
+    MOZ_RELEASE_ASSERT(aThread);
+    pump_ = new mozilla::ipc::MessagePumpForAndroidUI(aThread);
+    return;
+#endif // defined(MOZ_WIDGET_ANDROID)
   default:
     // Create one of Chromium's standard MessageLoop types below.
     break;
   }
 
 #if defined(OS_WIN)
   // TODO(rvargas): Get rid of the OS guards.
   if (type_ == TYPE_DEFAULT) {
--- a/ipc/chromium/src/base/message_loop.h
+++ b/ipc/chromium/src/base/message_loop.h
@@ -175,17 +175,18 @@ public:
   //
   enum Type {
     TYPE_DEFAULT,
     TYPE_UI,
     TYPE_IO,
     TYPE_MOZILLA_CHILD,
     TYPE_MOZILLA_PARENT,
     TYPE_MOZILLA_NONMAINTHREAD,
-    TYPE_MOZILLA_NONMAINUITHREAD
+    TYPE_MOZILLA_NONMAINUITHREAD,
+    TYPE_MOZILLA_ANDROID_UI
   };
 
   // Normally, it is not necessary to instantiate a MessageLoop.  Instead, it
   // is typical to make use of the current thread's MessageLoop instance.
   explicit MessageLoop(Type type = TYPE_DEFAULT, nsIThread* aThread = nullptr);
   ~MessageLoop();
 
   // Returns the type passed to the constructor.