зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1264231 - Part 3: remove loadInfo work-around. r=sicking
This commit is contained in:
Родитель
66f1364b04
Коммит
a520e75a4d
|
@ -572,14 +572,6 @@ public:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a workaround and it will be fix in bug 1264230.
|
|
||||||
nsCOMPtr<nsILoadInfo> loadInfo = channel->GetLoadInfo();
|
|
||||||
if (loadInfo) {
|
|
||||||
NeckoOriginAttributes originAttrs;
|
|
||||||
NS_GetOriginAttributes(channel, originAttrs);
|
|
||||||
loadInfo->SetOriginAttributes(originAttrs);
|
|
||||||
}
|
|
||||||
|
|
||||||
// The listener holds a strong reference to us. This creates a
|
// The listener holds a strong reference to us. This creates a
|
||||||
// reference cycle, once we've set mChannel, which is manually broken
|
// reference cycle, once we've set mChannel, which is manually broken
|
||||||
// in the listener's OnStartRequest method after it is finished with
|
// in the listener's OnStartRequest method after it is finished with
|
||||||
|
|
|
@ -851,21 +851,6 @@ NewImageChannel(nsIChannel** aResult,
|
||||||
}
|
}
|
||||||
(*aResult)->SetLoadGroup(loadGroup);
|
(*aResult)->SetLoadGroup(loadGroup);
|
||||||
|
|
||||||
// This is a workaround and a real fix in bug 1264231.
|
|
||||||
if (callbacks) {
|
|
||||||
nsCOMPtr<nsILoadContext> loadContext = do_GetInterface(callbacks);
|
|
||||||
if (loadContext) {
|
|
||||||
nsCOMPtr<nsILoadInfo> loadInfo;
|
|
||||||
rv = (*aResult)->GetLoadInfo(getter_AddRefs(loadInfo));
|
|
||||||
NS_ENSURE_SUCCESS(rv, rv);
|
|
||||||
DocShellOriginAttributes originAttrs;
|
|
||||||
loadContext->GetOriginAttributes(originAttrs);
|
|
||||||
NeckoOriginAttributes neckoOriginAttrs;
|
|
||||||
neckoOriginAttrs.InheritFromDocShellToNecko(originAttrs);
|
|
||||||
loadInfo->SetOriginAttributes(neckoOriginAttrs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче