Bug 1574372 - Add parent-process version of nsDocumentOpenInfo, and use it in DocumentLoadListener. r=bzbarsky

Differential Revision: https://phabricator.services.mozilla.com/D56137
This commit is contained in:
Matt Woodrow
2019-12-16 21:26:01 +00:00
parent d8114d1cd8
commit 28378eb5fe
15 changed files with 306 additions and 54 deletions

View File

@@ -10244,6 +10244,15 @@ nsresult nsDocShell::OpenInitializedChannel(nsIChannel* aChannel,
// Let the client channel helper know if we are using DocumentChannel,
// since redirects get handled in the parent process in that case.
RefPtr<net::DocumentChannelChild> docChannel = do_QueryObject(aChannel);
if (docChannel) {
bool pluginsAllowed = true;
GetAllowPlugins(&pluginsAllowed);
docChannel->SetDocumentOpenFlags(aOpenFlags, pluginsAllowed);
// Now that we've sent the real flags across to be run on the parent,
// tell the content process nsDocumentOpenInfo to not try to do
// any sort of targeting.
aOpenFlags |= nsIURILoader::DONT_RETARGET;
}
// Since we are loading a document we need to make sure the proper reserved
// and initial client data is stored on the nsILoadInfo. The