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
--- 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);
}