Bug 1429904 - Add 'using namespace mozilla;' to ProfileBufferEntry.cpp and remove some mozilla:: prefixes. r=njn
authorMarkus Stange <mstange@themasta.com>
Sat, 17 Feb 2018 12:35:57 -0500
changeset 461205 c072bfec3cd0e6edc11c7b17ea0a73f45487d4e5
parent 461204 0bf304822495a39b50a173fb1f62cc7602bbcab8
child 461206 5438aa8b248a59a16e14c961bb32f33d90c218d7
push id1683
push usersfraser@mozilla.com
push dateThu, 26 Apr 2018 16:43:40 +0000
treeherdermozilla-release@5af6cb21869d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnjn
bugs1429904
milestone60.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 1429904 - Add 'using namespace mozilla;' to ProfileBufferEntry.cpp and remove some mozilla:: prefixes. r=njn I think this file was picking up such a declaration from a different file already, through unified builds. MozReview-Commit-ID: 9xTB2QA86U0
tools/profiler/core/ProfileBufferEntry.cpp
--- a/tools/profiler/core/ProfileBufferEntry.cpp
+++ b/tools/profiler/core/ProfileBufferEntry.cpp
@@ -15,23 +15,17 @@
 // JS
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "js/TrackedOptimizationInfo.h"
 
 // Self
 #include "ProfileBufferEntry.h"
 
-using mozilla::JSONWriter;
-using mozilla::MakeUnique;
-using mozilla::Maybe;
-using mozilla::Nothing;
-using mozilla::Some;
-using mozilla::TimeStamp;
-using mozilla::UniquePtr;
+using namespace mozilla;
 
 ////////////////////////////////////////////////////////////////////////
 // BEGIN ProfileBufferEntry
 
 ProfileBufferEntry::ProfileBufferEntry()
   : mKind(Kind::INVALID)
 {
   u.mString = nullptr;
@@ -296,28 +290,28 @@ UniqueStacks::JITAddress::Hash() const
   hash = AddToHash(hash, mStreamingGen);
   return hash;
 }
 
 uint32_t UniqueStacks::FrameKey::Hash() const
 {
   uint32_t hash = 0;
   if (!mLocation.IsEmpty()) {
-    hash = mozilla::HashString(mLocation.get());
+    hash = HashString(mLocation.get());
   }
   if (mLine.isSome()) {
-    hash = mozilla::AddToHash(hash, *mLine);
+    hash = AddToHash(hash, *mLine);
   }
   if (mCategory.isSome()) {
-    hash = mozilla::AddToHash(hash, *mCategory);
+    hash = AddToHash(hash, *mCategory);
   }
   if (mJITAddress.isSome()) {
-    hash = mozilla::AddToHash(hash, mJITAddress->Hash());
+    hash = AddToHash(hash, mJITAddress->Hash());
     if (mJITDepth.isSome()) {
-      hash = mozilla::AddToHash(hash, *mJITDepth);
+      hash = AddToHash(hash, *mJITDepth);
     }
   }
   return hash;
 }
 
 UniqueStacks::UniqueStacks()
 {
   mFrameTableWriter.StartBareList();
@@ -518,17 +512,17 @@ StreamJITFrameOptimizations(SpliceableJS
         aJITFrame.forEachOptimizationAttempt(op, script.address(), &pc);
       }
       aWriter.EndArray();
     }
     aWriter.EndObject();
 
     if (JSAtom* name = js::GetPropertyNameFromPC(script, pc)) {
       char buf[512];
-      JS_PutEscapedFlatString(buf, mozilla::ArrayLength(buf), js::AtomToFlatString(name), 0);
+      JS_PutEscapedFlatString(buf, ArrayLength(buf), js::AtomToFlatString(name), 0);
       aUniqueStrings.WriteProperty(aWriter, "propertyName", buf);
     }
 
     unsigned line, column;
     line = JS_PCToLineNumber(script, pc, &column);
     aWriter.IntProperty("line", line);
     aWriter.IntProperty("column", column);
   }