Closed Bug 1620875 Opened 4 years ago Closed 4 years ago

Suppress onStateChange RemoteWebProgress events from switching DocumentChannel with a real channel.

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: mattwoodrow, Assigned: mattwoodrow)

References

Details

Attachments

(2 files)

We currently fire an onStateChange event via RemoteWebProgress to the parent-process when we replace DocumentChannel with the real channel.

This happens for same-process replacements (with STATE_IS_REDIRECTED_DOCUMENT) and for cross-process replacements (a full new STATE_START|STATE_IS_DOCUMENT etc).

For the process switching case there is a STATE_STOP state change fired in the old process, but we block this from being forwarded via RemoteWebProgress.

I think we should block these extra state changes from being forwarded via RemoteWebProgress (but keep them locally within the process), so that DocumentChannel changes/process-switches aren't observable.

It's possible that the best solution would be to drop RemoteWebProgress entirely, and have CanonicalBrowsingContext synthesize all the events itself based on its knowledge of load progress, but that's a much harder change.

We've already had to work around a bunch of issues with the mismatched number of START notifications, and I just ran into another here - https://searchfox.org/mozilla-central/rev/557a0e222dd104c5d805ba344c45d6abc27d3db0/browser/base/content/tabbrowser.js#5912

I think it'll be easier to hide process switching as an internal implementation detail, rather than expect the consumers of RemoteWebProgress to understand it.

Assignee: nobody → matt.woodrow
Blocks: 1589982

Note that process switches will still fire RemoteWebProgress events for the initial about:blank within the new process, but these are harder to suppress, and the frontend handles them already.

Depends on D65922

Attachment #9131783 - Attachment description: Bug 1620875 - Suppress extra onStateChange(STATE_START) notifications from RemoteWebProgress when switching DocumentChannel with a real channel. r?Gijs!,nika!,mayhemer! → Bug 1620875 - Suppress extra onStateChange(STATE_START) notifications from RemoteWebProgress when switching DocumentChannel with a real channel. r?Gijs!,nika!
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/782f7009892f
Don't duplicate loadFlags in the http specific config as well as the generic config for DocumentChannel replacement. r=nika
https://hg.mozilla.org/integration/autoland/rev/06a61ba9c444
Suppress extra onStateChange(STATE_START) notifications from RemoteWebProgress when switching DocumentChannel with a real channel. r=Gijs,nika
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla76
Regressions: 1623849
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: