Modify the process-switching load code to support POST payloads on loads
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: relaas, Assigned: nika)
References
(Blocks 2 open bugs)
Details
Attachments
(7 files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
No description provided.
Updated•6 years ago
|
Reporter | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
This is needed because early in a content process's lifecycle, NeckoParent may not have been created yet. This leads to issues when trying to redirect into a fresh process which hasn't performed network loads yet. By sending the message over PContent, we can be sure the APIs are available.
Assignee | ||
Comment 3•6 years ago
|
||
This is handy when performing process swaps, as it provides useful & important information to parent-process callers. Depends on D15608
Assignee | ||
Comment 4•6 years ago
|
||
With the old process selector service implementation, non-cached loads would skip the call into the process selector. While reading through the various places which I would need to add check calls, I noticed that a similar mechanism already existed: the 'redirectTo' method on nsIHttpChannel. This code piggybacks on that implementation to support injecting process swaps. (NOTE: Still WIP) Depends on D15609
Assignee | ||
Comment 5•6 years ago
|
||
This code largely skips the logic in load methods, and tries to simply get the channel opened & connected to the correct listener ASAP, without breaking any loading state. (NOTE: Still WIP) Depends on D15610
Assignee | ||
Comment 6•6 years ago
|
||
This will only happen if the pref is enabled, and works through the existing mechanism for process switching loads. This currently encounters an issue where, because the process changing logic destroys the originating nsDocShell before the channel has been reconnected into the new process. This causes the channel to be closed, and the load to not succeed. (NOTE: Still WIP) Depends on D15611
Assignee | ||
Comment 7•6 years ago
|
||
Depends on D15612
Assignee | ||
Comment 8•6 years ago
|
||
As I mention in some of the above comments, I am running into issues due to the channel being closed by the original TabChild as it is shut down during the process swap. It seems as though the redirect process doesn't proceed far enough before the new TabParent is provided for the redirect to proceed smoothly. Valentin, do you know what changes would need to be made to allow this to work? I have tried to figure out how the HTTP loading code works, but I am not yet confident in my understanding & don't know what I would need to set up.
(In reply to :Nika Layzell from comment #8)
As I mention in some of the above comments, I am running into issues due to
the channel being closed by the original TabChild as it is shut down during
the process swap. It seems as though the redirect process doesn't proceed
far enough before the new TabParent is provided for the redirect to proceed
smoothly.Valentin, do you know what changes would need to be made to allow this to
work? I have tried to figure out how the HTTP loading code works, but I am
not yet confident in my understanding & don't know what I would need to set
up.
From what I recall, the old channel is deleted by HttpChannelParentListener::OnRedirectResult() [1]
This is the big-picture of how redirects work. [2]
I'm thinking we should delay destroying the old docshell/tabchild until the redirect is completed, no? Or maybe add a way of destroying the tabChild that doesn't close the parent-side of the channel, so it gets a chance to complete the redirect?
[1] https://searchfox.org/mozilla-central/rev/76fe4bb385348d3f45bbebcf69ba8c7283dfcec7/netwerk/protocol/http/HttpChannelParentListener.cpp#322
[2] https://gist.github.com/valenting/ce444c31bb8ef2f53b9acfc3f59feedb
![]() |
||
Comment 11•6 years ago
|
||
What's the review priority for me here?
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
|
||
Depends on D15613
Assignee | ||
Comment 14•6 years ago
|
||
(In reply to Honza Bambas (:mayhemer) from comment #12)
see c11
This is fairly high priority with the new revision just posted. These patches now past at least some tests & I would like to start being able to use the new process changing capabilities. It'd also be really nice to have your input as to how exactly the interception should be performed, especially considering the limitations which I'm thinking currently exist. If you have a good solution for working around those issues please let me know :-)
![]() |
||
Comment 15•6 years ago
|
||
OK, I will do this as the first thing the next week (Monday).
Comment 16•6 years ago
|
||
Pushed by nlayzell@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b0b61b6a4014 Part 1: Move CrossProcessRedirect Message to PContent, r=valentin https://hg.mozilla.org/integration/autoland/rev/881438d34f09 Part 2: Add BrowsingContextID to LoadInfo, r=valentin https://hg.mozilla.org/integration/autoland/rev/c320f8c70785 Part 3: Support uncached resources by using a redirectTo-like API for process swaps in necko, r=valentin,mayhemer https://hg.mozilla.org/integration/autoland/rev/47630659e925 Part 4: Add support for piping redirected channels through nsDocShell's loading functions, r=qdot https://hg.mozilla.org/integration/autoland/rev/ae82e6f22e29 Part 5: Perform parent-process interception for HTTP loads, r=qdot,valentin https://hg.mozilla.org/integration/autoland/rev/909797e624a8 Part 6: Add basic test for process-changing POST loads, r=qdot https://hg.mozilla.org/integration/autoland/rev/4e5e0c80bae2 Part 7: Renumber Continue* methods on nsHttpChannel, r=valentin,mayhemer
Comment 17•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b0b61b6a4014
https://hg.mozilla.org/mozilla-central/rev/881438d34f09
https://hg.mozilla.org/mozilla-central/rev/c320f8c70785
https://hg.mozilla.org/mozilla-central/rev/47630659e925
https://hg.mozilla.org/mozilla-central/rev/ae82e6f22e29
https://hg.mozilla.org/mozilla-central/rev/909797e624a8
https://hg.mozilla.org/mozilla-central/rev/4e5e0c80bae2
Updated•6 years ago
|
Updated•5 years ago
|
Description
•