Bug 1709346 - Part 1: Track BrowsingContextWebProgress for subframes, r=mattwoodrow,kmag,necko-reviewers

This allows loads to be tracked as they are ongoing on a per-context basis in
the parent process, and for events to be generated for each subframe as it is
destroyed.

This patch also stops sending the `IsLoadingDocument` flag on the request to
the main process and removes RemoteWebProgress, as they are no longer necessary
due to being tracked directly.

Finally this patch also adds some logging to BrowsingContextWebProgress
to make it easier to diagnose this type of issue in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115706
This commit is contained in:
Nika Layzell
2021-05-25 15:54:48 +00:00
parent 05da8627a7
commit 431beb8c3b
14 changed files with 378 additions and 260 deletions

View File

@@ -779,8 +779,10 @@ void BrowsingContext::Attach(bool aFromIPC, ContentParent* aOriginProcess) {
}
});
if (IsTopContent() && !Canonical()->GetWebProgress()) {
Canonical()->mWebProgress = new BrowsingContextWebProgress();
// We want to create a BrowsingContextWebProgress for all content
// BrowsingContexts.
if (IsContent() && !Canonical()->mWebProgress) {
Canonical()->mWebProgress = new BrowsingContextWebProgress(Canonical());
}
}