Bug 865745 - Remove nsFrameScriptExecutor::DestroyCx. r=smaug

This commit is contained in:
Bobby Holley 2013-06-29 18:44:06 -06:00
parent 493debc74c
commit e689963ce5
4 changed files with 3 additions and 15 deletions

View File

@ -859,12 +859,6 @@ nsFrameScriptExecutor::DidCreateGlobal()
}
}
void
nsFrameScriptExecutor::DestroyCx()
{
mGlobal = nullptr;
}
static PLDHashOperator
CachedScriptUnrooter(const nsAString& aKey,
nsFrameJSScriptExecutorHolder*& aData,

View File

@ -284,8 +284,6 @@ protected:
~nsFrameScriptExecutor()
{ MOZ_COUNT_DTOR(nsFrameScriptExecutor); }
void DidCreateGlobal();
// Call this when you want to destroy mCx.
void DestroyCx();
void LoadFrameScriptInternal(const nsAString& aURL);
enum CacheFailedBehavior { EXECUTE_IF_CANT_CACHE, DONT_EXECUTE };
void TryCacheLoadAndCompileScript(const nsAString& aURL,

View File

@ -246,9 +246,7 @@ nsInProcessTabChildGlobal::DelayedDisconnect()
if (!mLoadingScript) {
nsContentUtils::ReleaseWrapper(static_cast<EventTarget*>(this), this);
if (mGlobal) {
DestroyCx();
}
mGlobal = nullptr;
} else {
mDelayedDisconnect = true;
}

View File

@ -1145,10 +1145,8 @@ TabChild::~TabChild()
if (webBrowser) {
webBrowser->SetContainerWindow(nullptr);
}
if (mGlobal) {
DestroyCx();
}
mGlobal = nullptr;
if (mTabChildGlobal) {
nsEventListenerManager* elm = mTabChildGlobal->GetListenerManager(false);
if (elm) {