Bug 1601779 - Don't process switch when we actually abort a channel load. r=kmag

We currently do a process switch for a failed load so that we show an error page in the right process. This adds an exception for loads that we just explicitly cancelled, since it shouldn't be necessary, and so that tests that use BrowserUtils.waitForDocLoadAndStopIt don't get confused.

Differential Revision: https://phabricator.services.mozilla.com/D58889

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Matt Woodrow 2020-01-09 02:40:03 +00:00
Родитель 4fc5462a1e
Коммит 282120e051
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -937,9 +937,11 @@ DocumentLoadListener::OnStartRequest(nsIRequest* aRequest) {
// SessionStore.jsm. This will determine if a new process needs to be
// spawned and if so SwitchProcessTo() will be called which will set a
// ContentProcessIdPromise.
nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
obsService->NotifyObservers(ToSupports(this), "channel-on-may-change-process",
nullptr);
if (status != NS_BINDING_ABORTED) {
nsCOMPtr<nsIObserverService> obsService = services::GetObserverService();
obsService->NotifyObservers(ToSupports(this),
"channel-on-may-change-process", nullptr);
}
if (mRedirectContentProcessIdPromise) {
TriggerCrossProcessSwitch();