Bug 1126790: Move MainThreadIOLoggerImpl into anonymous namespace (joining a type used in one of its fields), to fix gcc warning. r=froydnj
authorDaniel Holbert <dholbert@cs.stanford.edu>
Wed, 28 Jan 2015 09:40:28 -0800
changeset 239747 c665e2057216792ec94eac31c645c8ad79ba4a6c
parent 239746 050e9b432799d3761179fc52fd0973c10ed5bb54
child 239748 0f7b2674c64a241d36a6e1a3dba6175ef1a8296d
push id506
push usermleibovic@mozilla.com
push dateThu, 29 Jan 2015 12:40:10 +0000
reviewersfroydnj
bugs1126790
milestone38.0a1
Bug 1126790: Move MainThreadIOLoggerImpl into anonymous namespace (joining a type used in one of its fields), to fix gcc warning. r=froydnj
xpcom/build/MainThreadIOLogger.cpp
--- a/xpcom/build/MainThreadIOLogger.cpp
+++ b/xpcom/build/MainThreadIOLogger.cpp
@@ -38,21 +38,17 @@ struct ObservationWithStack
     }
   }
 
   mozilla::IOInterposeObserver::Observation mObservation;
   ProfilerBacktrace*                        mStack;
   nsString                                  mFilename;
 };
 
-} // anonymous namespace
-
-namespace mozilla {
-
-class MainThreadIOLoggerImpl MOZ_FINAL : public IOInterposeObserver
+class MainThreadIOLoggerImpl MOZ_FINAL : public mozilla::IOInterposeObserver
 {
 public:
   MainThreadIOLoggerImpl();
   ~MainThreadIOLoggerImpl();
 
   bool Init();
 
   void Observe(Observation& aObservation);
@@ -199,16 +195,20 @@ MainThreadIOLoggerImpl::Observe(Observat
     // The writer thread isn't running. Don't enqueue any more data.
     return;
   }
   // Passing nullptr as aStack parameter for now
   mObservations.push_back(ObservationWithStack(aObservation, nullptr));
   lock.Notify();
 }
 
+} // anonymous namespace
+
+namespace mozilla {
+
 namespace MainThreadIOLogger {
 
 bool
 Init()
 {
   nsAutoPtr<MainThreadIOLoggerImpl> impl(new MainThreadIOLoggerImpl());
   if (!impl->Init()) {
     return false;