Bug 1396869 - eliminate -Wunused-private-field warnings in Android's message pump; r=jld
authorNathan Froyd <froydnj@mozilla.com>
Wed, 06 Sep 2017 13:10:33 -0400
changeset 428847 366b9e432a3067e28bffba14fe9e538c62a584a9
parent 428846 74069a2587861d660a08d4012b34742ea59071d3
child 428848 e3dd3dbdc7358526c7a55716b0e6980506b74df6
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjld
bugs1396869
milestone57.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 1396869 - eliminate -Wunused-private-field warnings in Android's message pump; r=jld Android's MessagePumpForUI includes some useless code in its MessagePumpAndroid class, which is completely unused. Let's go ahead and delete that.
ipc/chromium/src/base/message_pump_android.cc
ipc/chromium/src/base/message_pump_android.h
--- a/ipc/chromium/src/base/message_pump_android.cc
+++ b/ipc/chromium/src/base/message_pump_android.cc
@@ -17,32 +17,22 @@ namespace mozilla {
 bool ProcessNextEvent();
 void NotifyEvent();
 }
 
 namespace base {
 
 MessagePumpForUI::MessagePumpForUI()
   : state_(NULL)
-  , pump(*this)
 {
 }
 
 MessagePumpForUI::~MessagePumpForUI() {
 }
 
-MessagePumpAndroid::MessagePumpAndroid(MessagePumpForUI &aPump)
-  : pump(aPump)
-{
-}
-
-MessagePumpAndroid::~MessagePumpAndroid()
-{
-}
-
 void MessagePumpForUI::Run(Delegate* delegate) {
   RunState state;
   state.delegate = delegate;
   state.should_quit = false;
   state.run_depth = state_ ? state_->run_depth + 1 : 1;
   // We really only do a single task for each iteration of the loop.  If we
   // have done something, assume there is likely something more to do.  This
   // will mean that we don't block on the message pump until there was nothing
--- a/ipc/chromium/src/base/message_pump_android.h
+++ b/ipc/chromium/src/base/message_pump_android.h
@@ -7,28 +7,16 @@
 #ifndef BASE_MESSAGE_PUMP_ANDROID_H_
 #define BASE_MESSAGE_PUMP_ANDROID_H_
 
 #include "base/message_pump.h"
 #include "base/time.h"
 
 namespace base {
 
-class MessagePumpForUI;
-
-class MessagePumpAndroid {
-
- public:
-  MessagePumpAndroid(MessagePumpForUI &pump);
-  ~MessagePumpAndroid();
-
- private:
-  base::MessagePumpForUI &pump;
-};
-
 // This class implements a MessagePump needed for TYPE_UI MessageLoops on
 // Android
 class MessagePumpForUI : public MessagePump {
 
  public:
   MessagePumpForUI();
   ~MessagePumpForUI();
 
@@ -61,17 +49,14 @@ class MessagePumpForUI : public MessageP
 
   RunState* state_;
 
   // This is the time when we need to do delayed work.
   TimeTicks delayed_work_time_;
 
   bool work_scheduled;
 
-  // MessagePump implementation for Android based on the GLib implement.
-  MessagePumpAndroid pump;
-
   DISALLOW_COPY_AND_ASSIGN(MessagePumpForUI);
 };
 
 }  // namespace base
 
 #endif  // BASE_MESSAGE_PUMP_ANDROID_H_