Bug 1329467 - Move remaining *RAII classes from GeckoProfiler under mozilla namespace. r?mstange draft
authorJan Beich <jbeich@FreeBSD.org>
Mon, 09 Jan 2017 22:11:58 +0000
changeset 457788 79e9d56a9608129fbcba9d89c19a96b325a5d6fe
parent 457786 5c01f85c4a3beda9aee1006be9a3ce35d833c7b8
child 457789 431251ee911f1d4aa92039b542a25787b907b235
push id40893
push userbmo:jbeich@FreeBSD.org
push dateMon, 09 Jan 2017 22:25:06 +0000
reviewersmstange
bugs1329467
milestone53.0a1
Bug 1329467 - Move remaining *RAII classes from GeckoProfiler under mozilla namespace. r?mstange MozReview-Commit-ID: I8qqGDLJkgo
ipc/chromium/src/base/message_pump_default.cc
tools/profiler/public/GeckoProfiler.h
--- a/ipc/chromium/src/base/message_pump_default.cc
+++ b/ipc/chromium/src/base/message_pump_default.cc
@@ -53,27 +53,27 @@ void MessagePumpDefault::Run(Delegate* d
     if (did_work)
       continue;
 
     if (delayed_work_time_.is_null()) {
       hangMonitor.NotifyWait();
       PROFILER_LABEL("MessagePump", "Wait",
         js::ProfileEntry::Category::OTHER);
       {
-        GeckoProfilerSleepRAII profiler_sleep;
+        mozilla::GeckoProfilerSleepRAII profiler_sleep;
         event_.Wait();
       }
     } else {
       TimeDelta delay = delayed_work_time_ - TimeTicks::Now();
       if (delay > TimeDelta()) {
         hangMonitor.NotifyWait();
         PROFILER_LABEL("MessagePump", "Wait",
           js::ProfileEntry::Category::OTHER);
         {
-          GeckoProfilerSleepRAII profiler_sleep;
+          mozilla::GeckoProfilerSleepRAII profiler_sleep;
           event_.TimedWait(delay);
         }
       } else {
         // It looks like delayed_work_time_ indicates a time in the past, so we
         // need to call DoDelayedWork now.
         delayed_work_time_ = TimeTicks();
       }
     }
--- a/tools/profiler/public/GeckoProfiler.h
+++ b/tools/profiler/public/GeckoProfiler.h
@@ -261,16 +261,18 @@ private:
 } // namespace mozilla
 
 #else
 
 #include "GeckoProfilerImpl.h"
 
 #endif
 
+namespace mozilla {
+
 class MOZ_RAII GeckoProfilerInitRAII {
 public:
   explicit GeckoProfilerInitRAII(void* stackTop) {
     profiler_init(stackTop);
   }
   ~GeckoProfilerInitRAII() {
     profiler_shutdown();
   }
@@ -304,18 +306,16 @@ public:
       MOZ_ASSERT(!profiler_is_sleeping());
       profiler_sleep_start();
     }
   }
 private:
   bool mIssuedWake;
 };
 
-namespace mozilla {
-
 class MOZ_RAII GeckoProfilerTracingRAII {
 public:
   GeckoProfilerTracingRAII(const char* aCategory, const char* aInfo,
                            UniqueProfilerBacktrace aBacktrace
                            MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
     : mCategory(aCategory)
     , mInfo(aInfo)
   {