Bug 888682 - Inline traverse/unlink for mGlobal and simplify CC goop for nsInProcessTabChildGlobal.cpp. r=smaug

This commit is contained in:
Bobby Holley 2013-07-02 23:30:36 -06:00
Родитель ead93cff77
Коммит 70f8f2c6e8
3 изменённых файлов: 4 добавлений и 30 удалений

Просмотреть файл

@ -1033,21 +1033,6 @@ nsFrameScriptExecutor::InitTabChildGlobalInternal(nsISupports* aScope,
return true;
}
// static
void
nsFrameScriptExecutor::Traverse(nsFrameScriptExecutor *tmp,
nsCycleCollectionTraversalCallback &cb)
{
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mGlobal)
}
// static
void
nsFrameScriptExecutor::Unlink(nsFrameScriptExecutor* aTmp)
{
aTmp->mGlobal = nullptr;
}
NS_IMPL_ISUPPORTS1(nsScriptCacheCleaner, nsIObserver)
nsFrameMessageManager* nsFrameMessageManager::sChildProcessManager = nullptr;

Просмотреть файл

@ -289,9 +289,6 @@ protected:
void TryCacheLoadAndCompileScript(const nsAString& aURL,
CacheFailedBehavior aBehavior = DONT_EXECUTE);
bool InitTabChildGlobalInternal(nsISupports* aScope, const nsACString& aID);
static void Traverse(nsFrameScriptExecutor *tmp,
nsCycleCollectionTraversalCallback &cb);
static void Unlink(nsFrameScriptExecutor* aTmp);
nsCOMPtr<nsIXPConnectJSObjectHolder> mGlobal;
nsCOMPtr<nsIPrincipal> mPrincipal;
static nsDataHashtable<nsStringHashKey, nsFrameJSScriptExecutorHolder*>* sCachedScripts;

Просмотреть файл

@ -144,18 +144,10 @@ nsInProcessTabChildGlobal::Init()
return NS_OK;
}
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsInProcessTabChildGlobal,
nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mMessageManager)
NS_IMPL_CYCLE_COLLECTION_UNLINK(mGlobal)
nsFrameScriptExecutor::Unlink(tmp);
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(nsInProcessTabChildGlobal,
nsDOMEventTargetHelper)
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mMessageManager)
nsFrameScriptExecutor::Traverse(tmp, cb);
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(nsInProcessTabChildGlobal,
nsDOMEventTargetHelper,
mMessageManager,
mGlobal)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(nsInProcessTabChildGlobal)
NS_INTERFACE_MAP_ENTRY(nsIMessageListenerManager)