author | Ms2ger <ms2ger@gmail.com> |
Thu, 27 Mar 2014 21:05:15 +0100 | |
changeset 175685 | 2124bd62783f4da2ad46edae0c5b3c3ba2816269 |
parent 175684 | a54f5ae6956d9b7f0dec965fd558f92b3ce05bae |
child 175686 | d6f9707cbf5321a9a22e2a279a4c729656edd0c5 |
push id | 41591 |
push user | Ms2ger@gmail.com |
push date | Thu, 27 Mar 2014 20:06:44 +0000 |
treeherder | mozilla-inbound@be912f59c937 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bholley |
bugs | 973950 |
milestone | 31.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
|
dom/base/nsJSEnvironment.cpp | file | annotate | diff | comparison | revisions | |
dom/base/nsJSEnvironment.h | file | annotate | diff | comparison | revisions |
--- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -186,17 +186,16 @@ static uint32_t sMinForgetSkippableTime static uint32_t sMaxForgetSkippableTime = 0; static uint32_t sTotalForgetSkippableTime = 0; static uint32_t sRemovedPurples = 0; static uint32_t sForgetSkippableBeforeCC = 0; static uint32_t sPreviousSuspectedCount = 0; static uint32_t sCleanupsSinceLastGC = UINT32_MAX; static bool sNeedsFullCC = false; static bool sNeedsGCAfterCC = false; -static nsJSContext *sContextList = nullptr; static bool sIncrementalCC = false; static nsScriptNameSpaceManager *gNameSpaceManager; static nsIJSRuntimeService *sRuntimeService; static const char kJSRuntimeServiceContractID[] = "@mozilla.org/js/xpc/RuntimeService;1"; @@ -762,23 +761,16 @@ nsJSContext::JSOptionChangedCallback(con nsJSContext::nsJSContext(bool aGCOnDestruction, nsIScriptGlobalObject* aGlobalObject) : mWindowProxy(nullptr) , mGCOnDestruction(aGCOnDestruction) , mGlobalObjectRef(aGlobalObject) { EnsureStatics(); - mNext = sContextList; - mPrev = &sContextList; - if (sContextList) { - sContextList->mPrev = &mNext; - } - sContextList = this; - ++sContextCount; mContext = ::JS_NewContext(sRuntime, gStackSize); if (mContext) { ::JS_SetContextPrivate(mContext, static_cast<nsIScriptContext *>(this)); // Make sure the new context gets the default context options JS::ContextOptionsRef(mContext).setPrivateIsNSISupports(true) @@ -790,21 +782,16 @@ nsJSContext::nsJSContext(bool aGCOnDestr } mIsInitialized = false; mProcessingScriptTag = false; HoldJSObjects(this); } nsJSContext::~nsJSContext() { - *mPrev = mNext; - if (mNext) { - mNext->mPrev = mPrev; - } - mGlobalObjectRef = nullptr; DestroyJSContext(); --sContextCount; if (!sContextCount && sDidShutdown) { // The last context is being deleted, and we're already in the
--- a/dom/base/nsJSEnvironment.h +++ b/dom/base/nsJSEnvironment.h @@ -155,19 +155,16 @@ private: bool mIsInitialized; bool mGCOnDestruction; bool mProcessingScriptTag; PRTime mModalStateTime; uint32_t mModalStateDepth; - nsJSContext *mNext; - nsJSContext **mPrev; - // mGlobalObjectRef ensures that the outer window stays alive as long as the // context does. It is eventually collected by the cycle collector. nsCOMPtr<nsIScriptGlobalObject> mGlobalObjectRef; static void JSOptionChangedCallback(const char *pref, void *data); static bool DOMOperationCallback(JSContext *cx); };