Bug 1258908: Rename TYPE_MOZILLA_UI to TYPE_MOZILLA_PARENT. r=jld
authorKyle Huey <khuey@kylehuey.com>
Mon, 28 Mar 2016 10:28:14 -0700
changeset 290733 360754dc00f6be0cfef2543f0db4fccfc8dffe11
parent 290732 4d6500208358f342d24b25e5ef32117e73138327
child 290734 a25d3a1c24b73bdfedf2196c0cee3b37bfb606a1
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1258908
milestone48.0a1
Bug 1258908: Rename TYPE_MOZILLA_UI to TYPE_MOZILLA_PARENT. r=jld
ipc/chromium/src/base/message_loop.cc
ipc/chromium/src/base/message_loop.h
xpcom/build/XPCOMInit.cpp
--- a/ipc/chromium/src/base/message_loop.cc
+++ b/ipc/chromium/src/base/message_loop.cc
@@ -101,17 +101,17 @@ MessageLoop::MessageLoop(Type type)
 #endif  // OS_WIN
       transient_hang_timeout_(0),
       permanent_hang_timeout_(0),
       next_sequence_num_(0) {
   DCHECK(!current()) << "should only have one message loop per thread";
   get_tls_ptr().Set(this);
 
   switch (type_) {
-  case TYPE_MOZILLA_UI:
+  case TYPE_MOZILLA_PARENT:
     pump_ = new mozilla::ipc::MessagePump();
     return;
   case TYPE_MOZILLA_CHILD:
     pump_ = new mozilla::ipc::MessagePumpForChildProcess();
     // There is a MessageLoop Run call from XRE_InitChildProcess
     // and another one from MessagePumpForChildProcess. The one
     // from MessagePumpForChildProcess becomes the base, so we need
     // to set run_depth_base_ to 2 or we'll never be able to process
--- a/ipc/chromium/src/base/message_loop.h
+++ b/ipc/chromium/src/base/message_loop.h
@@ -194,34 +194,34 @@ public:
   // TYPE_IO
   //   This type of ML also supports asynchronous IO.  See also
   //   MessageLoopForIO.
   //
   // TYPE_MOZILLA_CHILD
   //   This type of ML is used in Mozilla child processes which initialize
   //   XPCOM and use the gecko event loop.
   //
-  // TYPE_MOZILLA_UI
+  // TYPE_MOZILLA_PARENT
   //   This type of ML is used in Mozilla parent processes which initialize
   //   XPCOM and use the gecko event loop.
   //
   // TYPE_MOZILLA_NONMAINTHREAD
   //   This type of ML is used in Mozilla parent processes which initialize
   //   XPCOM and use the nsThread event loop.
   //
   // TYPE_MOZILLA_NONMAINUITHREAD
   //   This type of ML is used in Mozilla processes which initialize XPCOM
   //   and use TYPE_UI loop logic.
   //
   enum Type {
     TYPE_DEFAULT,
     TYPE_UI,
     TYPE_IO,
     TYPE_MOZILLA_CHILD,
-    TYPE_MOZILLA_UI,
+    TYPE_MOZILLA_PARENT,
     TYPE_MOZILLA_NONMAINTHREAD,
     TYPE_MOZILLA_NONMAINUITHREAD
   };
 
   // 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);
   ~MessageLoop();
@@ -468,17 +468,17 @@ class MessageLoopForUI : public MessageL
 
   // Returns the MessageLoopForUI of the current thread.
   static MessageLoopForUI* current() {
     MessageLoop* loop = MessageLoop::current();
     if (!loop)
       return NULL;
     Type type = loop->type();
     DCHECK(type == MessageLoop::TYPE_UI ||
-           type == MessageLoop::TYPE_MOZILLA_UI ||
+           type == MessageLoop::TYPE_MOZILLA_PARENT ||
            type == MessageLoop::TYPE_MOZILLA_CHILD);
     return static_cast<MessageLoopForUI*>(loop);
   }
 
 #if defined(OS_WIN)
   typedef base::MessagePumpWin::Dispatcher Dispatcher;
   typedef base::MessagePumpWin::Observer Observer;
 
--- a/xpcom/build/XPCOMInit.cpp
+++ b/xpcom/build/XPCOMInit.cpp
@@ -518,17 +518,17 @@ NS_InitXPCOM2(nsIServiceManager** aResul
   NS_ASSERTION(!sExitManager && !sMessageLoop, "Bad logic!");
 
   if (!AtExitManager::AlreadyRegistered()) {
     sExitManager = new AtExitManager();
   }
 
   MessageLoop* messageLoop = MessageLoop::current();
   if (!messageLoop) {
-    sMessageLoop = new MessageLoopForUI(MessageLoop::TYPE_MOZILLA_UI);
+    sMessageLoop = new MessageLoopForUI(MessageLoop::TYPE_MOZILLA_PARENT);
     sMessageLoop->set_thread_name("Gecko");
     // Set experimental values for main thread hangs:
     // 128ms for transient hangs and 8192ms for permanent hangs
     sMessageLoop->set_hang_timeouts(128, 8192);
   } else if (messageLoop->type() == MessageLoop::TYPE_MOZILLA_CHILD) {
     messageLoop->set_thread_name("Gecko_Child");
     messageLoop->set_hang_timeouts(128, 8192);
   }