Bug 1276231. Remove the unused return value of XPCJSContextStack::Pop. r=mrbkap
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 27 May 2016 13:28:01 -0400
changeset 340384 322c9a78bd3a9f2b1ed0216b5ba437951d3f2504
parent 340383 826c880607a1e78790b3028383a20f429aa85be9
child 340385 41837def5c6be47bd0b513dd4eec1d52aa93f9d4
push id1183
push userraliiev@mozilla.com
push dateMon, 05 Sep 2016 20:01:49 +0000
treeherdermozilla-release@3148731bed45 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1276231
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 1276231. Remove the unused return value of XPCJSContextStack::Pop. r=mrbkap
js/xpconnect/src/XPCJSContextStack.cpp
js/xpconnect/src/xpcprivate.h
--- a/js/xpconnect/src/XPCJSContextStack.cpp
+++ b/js/xpconnect/src/XPCJSContextStack.cpp
@@ -22,35 +22,32 @@ using mozilla::dom::DestroyProtoAndIface
 XPCJSContextStack::~XPCJSContextStack()
 {
     if (mSafeJSContext) {
         JS_DestroyContextNoGC(mSafeJSContext);
         mSafeJSContext = nullptr;
     }
 }
 
-JSContext*
+void
 XPCJSContextStack::Pop()
 {
     MOZ_ASSERT(!mStack.IsEmpty());
 
     uint32_t idx = mStack.Length() - 1; // The thing we're popping
 
-    JSContext* cx = mStack[idx];
-
     mStack.RemoveElementAt(idx);
     JSContext* newTop;
     // We _could_ probably use mStack.SafeElementAt(idx-1, nullptr) here....
     if (idx == 0) {
         newTop = nullptr;
     } else {
         newTop = mStack[idx-1];
     }
     js::Debug_SetActiveJSContext(mRuntime->Runtime(), newTop);
-    return cx;
 }
 
 void
 XPCJSContextStack::Push(JSContext* cx)
 {
     js::Debug_SetActiveJSContext(mRuntime->Runtime(), cx);
     mStack.AppendElement(cx);
 }
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -2804,17 +2804,17 @@ public:
 
 private:
     friend class mozilla::dom::danger::AutoCxPusher;
     friend void xpc::PushNullJSContext();
     friend void xpc::PopNullJSContext();
 
     // We make these private so that stack manipulation can only happen
     // through one of the above friends.
-    JSContext* Pop();
+    void Pop();
     void Push(JSContext* cx);
 
     AutoTArray<JSContext*, 16> mStack;
     XPCJSRuntime* mRuntime;
     JSContext*  mSafeJSContext;
 };
 
 /***************************************************************************/