From eea77304b56f728393a23755ffd951d24f10e1c3 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 23 Jun 2016 00:22:29 -0400 Subject: [PATCH] Bug 1281276 part 4. Get rid of XPCContext's mCallingLangType member. r=bholley --- js/xpconnect/src/XPCCallContext.cpp | 3 --- js/xpconnect/src/XPCContext.cpp | 7 +------ js/xpconnect/src/xpcprivate.h | 13 ------------- 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/js/xpconnect/src/XPCCallContext.cpp b/js/xpconnect/src/XPCCallContext.cpp index 55fdae59564f..1bb48e23b751 100644 --- a/js/xpconnect/src/XPCCallContext.cpp +++ b/js/xpconnect/src/XPCCallContext.cpp @@ -40,7 +40,6 @@ XPCCallContext::XPCCallContext(XPCContext::LangType callerLanguage, return; mXPCContext = XPCContext::GetXPCContext(mJSContext); - mPrevCallerLanguage = mXPCContext->SetCallingLangType(callerLanguage); // hook into call context chain. mPrevCallContext = XPCJSRuntime::Get()->SetCallContext(this); @@ -207,8 +206,6 @@ XPCCallContext::SystemIsBeingShutDown() XPCCallContext::~XPCCallContext() { if (mXPCContext) { - mXPCContext->SetCallingLangType(mPrevCallerLanguage); - DebugOnly old = XPCJSRuntime::Get()->SetCallContext(mPrevCallContext); MOZ_ASSERT(old == this, "bad pop from per thread data"); } diff --git a/js/xpconnect/src/XPCContext.cpp b/js/xpconnect/src/XPCContext.cpp index c3c170bb1269..0b87d084df95 100644 --- a/js/xpconnect/src/XPCContext.cpp +++ b/js/xpconnect/src/XPCContext.cpp @@ -17,8 +17,7 @@ XPCContext::XPCContext(XPCJSRuntime* aRuntime, : mRuntime(aRuntime), mJSContext(aJSContext), mLastResult(NS_OK), - mPendingResult(NS_OK), - mCallingLangType(LANG_UNKNOWN) + mPendingResult(NS_OK) { MOZ_COUNT_CTOR(XPCContext); @@ -49,10 +48,6 @@ XPCContext::DebugDump(int16_t depth) // XXX show the exception here... } - XPC_LOG_ALWAYS(("mCallingLangType of %s", - mCallingLangType == LANG_UNKNOWN ? "LANG_UNKNOWN" : - mCallingLangType == LANG_JS ? "LANG_JS" : - "LANG_NATIVE")); XPC_LOG_OUTDENT(); #endif } diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h index ccc4f0b8f409..4f7670bba0a7 100644 --- a/js/xpconnect/src/xpcprivate.h +++ b/js/xpconnect/src/xpcprivate.h @@ -673,16 +673,6 @@ public: enum LangType {LANG_UNKNOWN, LANG_JS, LANG_NATIVE}; - LangType GetCallingLangType() const - { - return mCallingLangType; - } - LangType SetCallingLangType(LangType lt) - { - LangType tmp = mCallingLangType; - mCallingLangType = lt; - return tmp; - } nsresult GetException(nsIException** e) { nsCOMPtr rval = mException; @@ -716,7 +706,6 @@ private: nsresult mLastResult; nsresult mPendingResult; nsCOMPtr mException; - LangType mCallingLangType; bool mErrorUnreported; }; @@ -852,8 +841,6 @@ private: // ctor does not necessarily init the following. BEWARE! - XPCContext::LangType mPrevCallerLanguage; - XPCCallContext* mPrevCallContext; XPCWrappedNative* mWrapper;