mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1087442 - Attach LoadInfo inside each individual ProtocolHandler - browser/ changes (r=sicking)
This commit is contained in:
parent
00ff1ea758
commit
0783aa8189
@ -153,8 +153,22 @@ AboutRedirector::NewChannel(nsIURI* aURI,
|
||||
for (int i = 0; i < kRedirTotal; i++) {
|
||||
if (!strcmp(path.get(), kRedirMap[i].id)) {
|
||||
nsCOMPtr<nsIChannel> tempChannel;
|
||||
rv = ioService->NewChannel(nsDependentCString(kRedirMap[i].url),
|
||||
nullptr, nullptr, getter_AddRefs(tempChannel));
|
||||
nsCOMPtr<nsIURI> tempURI;
|
||||
rv = NS_NewURI(getter_AddRefs(tempURI),
|
||||
nsDependentCString(kRedirMap[i].url));
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
// Bug 1087720 (and Bug 1099296):
|
||||
// Once all callsites have been updated to call NewChannel2()
|
||||
// instead of NewChannel() we should have a non-null loadInfo
|
||||
// consistently. Until then we have to branch on the loadInfo.
|
||||
if (aLoadInfo) {
|
||||
rv = NS_NewChannelInternal(getter_AddRefs(tempChannel),
|
||||
tempURI,
|
||||
aLoadInfo);
|
||||
}
|
||||
else {
|
||||
rv = ioService->NewChannelFromURI(tempURI, getter_AddRefs(tempChannel));
|
||||
}
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
tempChannel->SetOriginalURI(aURI);
|
||||
|
Loading…
Reference in New Issue
Block a user