Bug 1319850 - part 2, Update MessageLoop so that it supports MessagePumpForAndroidUI r=nfroyd
☠☠ backed out by b1213723e156 ☠ ☠
authorRandall Barker <rbarker@mozilla.com>
Wed, 30 Nov 2016 14:58:38 -0800
changeset 327039 2a8012945a74914ef0d51052d4fbdbf637d06573
parent 327038 8717bea884c99079359f7cfcc1e1ecea46b61ed9
child 327040 e31107c3f677659805753097d4273e472975dfbb
push id85087
push userrbarker@mozilla.com
push dateFri, 23 Dec 2016 00:22:27 +0000
treeherdermozilla-inbound@60ba1893ecf3 [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.