mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Backed out changeset af04d36c832d (bug 1670530) for bc failure on browser_viewsourceprefs.js . CLOSED TREE
This commit is contained in:
parent
57cc17836f
commit
41be6a07c9
@ -122,7 +122,6 @@ skip-if = fission
|
||||
[browser_bug852909.js]
|
||||
skip-if = (verify && debug && (os == 'win'))
|
||||
[browser_bug92473.js]
|
||||
[browser_bug1670530.js]
|
||||
[browser_data_load_inherit_csp.js]
|
||||
[browser_dataURI_unique_opaque_origin.js]
|
||||
[browser_uriFixupIntegration.js]
|
||||
|
@ -1,16 +0,0 @@
|
||||
const FOLDER = getRootDirectory(gTestPath).replace(
|
||||
"chrome://mochitests/content/",
|
||||
"https://example.com/"
|
||||
);
|
||||
|
||||
add_task(async function() {
|
||||
await BrowserTestUtils.withNewTab("about:robots", async browser => {
|
||||
is(browser.currentURI.spec, "about:robots");
|
||||
|
||||
let uri = `view-source:${FOLDER}/dummy_page.html`;
|
||||
BrowserTestUtils.loadURI(browser, uri);
|
||||
await BrowserTestUtils.browserLoaded(browser);
|
||||
|
||||
is(browser.currentURI.spec, uri);
|
||||
});
|
||||
});
|
@ -543,8 +543,8 @@ auto DocumentLoadListener::Open(nsDocShellLoadState* aLoadState,
|
||||
// OnStart/StopRequest with itself. We don't need this, and instead
|
||||
// we want the original request so that we get different ones for
|
||||
// each part of a multipart channel.
|
||||
if (nsCOMPtr<nsIViewSourceChannel> viewSourceChannel =
|
||||
do_QueryInterface(mChannel)) {
|
||||
nsCOMPtr<nsIViewSourceChannel> viewSourceChannel;
|
||||
if (aPid && (viewSourceChannel = do_QueryInterface(mChannel))) {
|
||||
viewSourceChannel->SetReplaceRequest(false);
|
||||
}
|
||||
|
||||
@ -2121,7 +2121,7 @@ DocumentLoadListener::OnStartRequest(nsIRequest* aRequest) {
|
||||
VariantIndex<0>{}, OnStartRequestParams{aRequest}});
|
||||
|
||||
if (mOpenPromiseResolved || mInitiatedRedirectToRealChannel) {
|
||||
// If we have already resolved the promise, there's no point to continue
|
||||
// I we have already resolved the promise, there's no point to continue
|
||||
// attempting a process switch or redirecting to the real channel.
|
||||
// We can also have multiple calls to OnStartRequest when dealing with
|
||||
// multi-part content, but only want to redirect once.
|
||||
@ -2177,31 +2177,6 @@ DocumentLoadListener::OnStartRequest(nsIRequest* aRequest) {
|
||||
}
|
||||
}
|
||||
|
||||
// If the channel is going to be handled in the parent process, resume
|
||||
// replacing the `request` parameter. This is necessary as docshell listeners
|
||||
// expect to be able to QueryInterface the nsIRequest parameter to
|
||||
// `nsIViewSourceChannel`.
|
||||
nsCOMPtr<nsIViewSourceChannel> viewSourceChannel =
|
||||
do_QueryInterface(mChannel);
|
||||
if (!willBeRemote && viewSourceChannel) {
|
||||
MOZ_ALWAYS_SUCCEEDS(viewSourceChannel->SetReplaceRequest(true));
|
||||
|
||||
// Replace the request parameter for already-recorded calls.
|
||||
for (auto& variant : mStreamListenerFunctions) {
|
||||
variant.match(
|
||||
[&](OnStartRequestParams& aParams) {
|
||||
aParams.request = viewSourceChannel;
|
||||
},
|
||||
[&](OnDataAvailableParams& aParams) {
|
||||
aParams.request = viewSourceChannel;
|
||||
},
|
||||
[&](OnStopRequestParams& aParams) {
|
||||
aParams.request = viewSourceChannel;
|
||||
},
|
||||
[&](OnAfterLastPartParams& aParams) {});
|
||||
}
|
||||
}
|
||||
|
||||
// If we're going to be delivering this channel to a remote content
|
||||
// process, then we want to install any required content conversions
|
||||
// in the content process.
|
||||
|
Loading…
Reference in New Issue
Block a user