mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1186843 - Always cache delayed scripts in message manager
This commit is contained in:
parent
420a083cd5
commit
21cb002f63
@ -518,16 +518,9 @@ nsFrameMessageManager::LoadScript(const nsAString& aURL,
|
||||
bool aRunInGlobalScope)
|
||||
{
|
||||
if (aAllowDelayedLoad) {
|
||||
if (IsGlobal() || IsBroadcaster()) {
|
||||
// Cache for future windows or frames
|
||||
mPendingScripts.AppendElement(aURL);
|
||||
mPendingScriptsGlobalStates.AppendElement(aRunInGlobalScope);
|
||||
} else if (!mCallback) {
|
||||
// We're frame message manager, which isn't connected yet.
|
||||
mPendingScripts.AppendElement(aURL);
|
||||
mPendingScriptsGlobalStates.AppendElement(aRunInGlobalScope);
|
||||
return NS_OK;
|
||||
}
|
||||
// Cache for future windows or frames
|
||||
mPendingScripts.AppendElement(aURL);
|
||||
mPendingScriptsGlobalStates.AppendElement(aRunInGlobalScope);
|
||||
}
|
||||
|
||||
if (mCallback) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user