Avoid recreating reserved Clients when we process switch
Categories
(Core :: DOM: Workers, enhancement, P1)
Tracking
()
People
(Reporter: mattwoodrow, Assigned: mattwoodrow)
References
Details
Attachments
(5 files)
The current flow for creating ClientSources for document loads with DocumentChannel is:
- The originating content process creates a reserved ClientSource for the initial URL of the load.
- If a redirect is encountered, then the parent process allocates a ClientInfo (for a 'future' ClientSource) using the new URL.
- If the load is to be delivered to the originating process:
- If there were no redirects, then copy the reserved ClientSource across to the final channel.
- If there were (so we have a ClientInfo), then we create a reserved ClientSource using that info (resolving the 'future' ClientSource). We also destroy the existing ClientSource created at the start.
- If we had to switch processes and the load is delivered to the new one:
- The new process unconditionally allocates a new reserved ClientSource (and ClientInfo!), and then we have to notify the parent of the new id to make sure we update the controlled client.
- The old process is torn down, destroying the existing ClientSource.
I think we can simplify this to:
- The parent process allocates a ClientInfo ('future' ClientSource) for both the initial URL, as well as any redirect URLs.
- When we deliver the load to a process (either originating or new), then we create a reserved ClientSource around the most recent ClientInfo.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
|
||
This should be a no-op, but should make the following changes easier to reason about.
Assignee | ||
Comment 2•5 years ago
|
||
Rather than creating a ClientSource in the content process for the initial URL, this changes us to just create the ClientInfo in the parent, as we do for redirects.
Depends on D63805
Assignee | ||
Comment 3•5 years ago
|
||
Now that we're guaranteed to not have an existing ClientSource in the old process, we no longer need to allocate a new ClientInfo in the new process.
This lets us just create a ClientSource around the ClientInfo already on the channel (exactly as we do for same-process loads), and we no longer need to reconcile changes with the parent.
Depends on D63807
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D63808
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D63809
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Comment 7•5 years ago
|
||
Backed out 7 changesets (bug 1617500, bug 1617789, bug 1617434) for build bustage in dom/clients/manager/ClientChannelHelper.cpp
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=291144779&repo=autoland&lineNumber=28560
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&revision=1a62904bfcb7345ea90841e179e8aea5e88ffac8
Backout:
https://hg.mozilla.org/integration/autoland/rev/d9db62e5092eaeefb7049b150bdd775016c9a62d
Comment 9•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Description
•