Bug 1275999 part 3. Remove the totally unused XPCJSContextStack::HasJSContext function. r=bholley
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 27 May 2016 09:53:32 -0400
changeset 338342 1d9e42ddcd59520042665e769c46c8d2a50a5981
parent 338341 ed57ef99f5e189f671ec09e54f9ccfa2d7980445
child 338343 8cab033c0e0b01536bdc1e85fa7fd0f798219165
push id6249
push userjlund@mozilla.com
push dateMon, 01 Aug 2016 13:59:36 +0000
treeherdermozilla-beta@bad9d4f5bf7e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbholley
bugs1275999
milestone49.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 1275999 part 3. Remove the totally unused XPCJSContextStack::HasJSContext function. r=bholley
js/xpconnect/src/XPCJSContextStack.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCJSContextStack.cpp
+++ b/js/xpconnect/src/XPCJSContextStack.cpp
@@ -51,25 +51,16 @@ XPCJSContextStack::Pop()
 bool
 XPCJSContextStack::Push(JSContext* cx)
 {
     js::Debug_SetActiveJSContext(mRuntime->Runtime(), cx);
     mStack.AppendElement(cx);
     return true;
 }
 
-bool
-XPCJSContextStack::HasJSContext(JSContext* cx)
-{
-    for (uint32_t i = 0; i < mStack.Length(); i++)
-        if (cx == mStack[i])
-            return true;
-    return false;
-}
-
 JSContext*
 XPCJSContextStack::GetSafeJSContext()
 {
     MOZ_ASSERT(mSafeJSContext);
     return mSafeJSContext;
 }
 
 JSContext*
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2798,17 +2798,16 @@ public:
 
     JSContext* Peek()
     {
         return mStack.IsEmpty() ? nullptr : mStack[mStack.Length() - 1];
     }
 
     JSContext* InitSafeJSContext();
     JSContext* GetSafeJSContext();
-    bool HasJSContext(JSContext* cx);
 
 private:
     friend class mozilla::dom::danger::AutoCxPusher;
     friend bool xpc::PushNullJSContext();
     friend void xpc::PopNullJSContext();
 
     // We make these private so that stack manipulation can only happen
     // through one of the above friends.