Bug 1329467 - Move remaining *RAII classes from GeckoProfiler under mozilla namespace. r=mstange
authorJan Beich <jbeich@FreeBSD.org>
Mon, 09 Jan 2017 22:11:58 +0000
changeset 329287 7b26a0681fcab0a40cf8b58471a3404905e8e96d
parent 329286 997b7726f2e4cc93a4234b533ffa8a482cbea157
child 329288 c5d6b1d405a842548bfbbf8539bc245c59f28780
push id31203
push userkwierso@gmail.com
push dateFri, 13 Jan 2017 23:28:17 +0000
treeherdermozilla-central@671a2f8542ca [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1329467
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 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
@@ -262,16 +262,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();
   }
@@ -305,18 +307,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)
   {