зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1247362 - move mAnonymousGlobalScope tracing into nsMessageManagerScriptExecutor; r=mccr8
This commit is contained in:
Родитель
6c2f04833f
Коммит
69d27155df
|
@ -57,9 +57,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(ProcessGlobal)
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER
|
||||
for (uint32_t i = 0; i < tmp->mAnonymousGlobalScopes.Length(); ++i) {
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mAnonymousGlobalScopes[i])
|
||||
}
|
||||
tmp->nsMessageManagerScriptExecutor::Trace(aCallbacks, aClosure);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ProcessGlobal)
|
||||
|
|
|
@ -1791,6 +1791,14 @@ nsMessageManagerScriptExecutor::TryCacheLoadAndCompileScript(
|
|||
TryCacheLoadAndCompileScript(aURL, aRunInGlobalScope, true, &script);
|
||||
}
|
||||
|
||||
void
|
||||
nsMessageManagerScriptExecutor::Trace(const TraceCallbacks& aCallbacks, void* aClosure)
|
||||
{
|
||||
for (size_t i = 0, length = mAnonymousGlobalScopes.Length(); i < length; ++i) {
|
||||
aCallbacks.Trace(&mAnonymousGlobalScopes[i], "mAnonymousGlobalScopes[i]", aClosure);
|
||||
}
|
||||
}
|
||||
|
||||
bool
|
||||
nsMessageManagerScriptExecutor::InitChildGlobalInternal(
|
||||
nsISupports* aScope,
|
||||
|
|
|
@ -397,6 +397,7 @@ protected:
|
|||
void TryCacheLoadAndCompileScript(const nsAString& aURL,
|
||||
bool aRunInGlobalScope);
|
||||
bool InitChildGlobalInternal(nsISupports* aScope, const nsACString& aID);
|
||||
void Trace(const TraceCallbacks& aCallbacks, void* aClosure);
|
||||
nsCOMPtr<nsIXPConnectJSObjectHolder> mGlobal;
|
||||
nsCOMPtr<nsIPrincipal> mPrincipal;
|
||||
AutoTArray<JS::Heap<JSObject*>, 2> mAnonymousGlobalScopes;
|
||||
|
|
|
@ -146,9 +146,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
|||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(nsInProcessTabChildGlobal,
|
||||
DOMEventTargetHelper)
|
||||
for (uint32_t i = 0; i < tmp->mAnonymousGlobalScopes.Length(); ++i) {
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mAnonymousGlobalScopes[i])
|
||||
}
|
||||
tmp->nsMessageManagerScriptExecutor::Trace(aCallbacks, aClosure);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(nsInProcessTabChildGlobal,
|
||||
|
|
|
@ -175,9 +175,7 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(TabChildBase)
|
|||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN(TabChildBase)
|
||||
for (uint32_t i = 0; i < tmp->mAnonymousGlobalScopes.Length(); ++i) {
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mAnonymousGlobalScopes[i])
|
||||
}
|
||||
tmp->nsMessageManagerScriptExecutor::Trace(aCallbacks, aClosure);
|
||||
NS_IMPL_CYCLE_COLLECTION_TRACE_END
|
||||
|
||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TabChildBase)
|
||||
|
|
Загрузка…
Ссылка в новой задаче