Last active
May 16, 2019 10:16
-
-
Save valenting/ce444c31bb8ef2f53b9acfc3f59feedb to your computer and use it in GitHub Desktop.
e10s HTTP channel redirect flow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parent Process Child Process 1 Child Process 2 | |
nsHttpChannel HttpChannelParentListener HttpChannelParent HttpChannelChild | |
+ | |
| | |
SessionStore.jsm::onMayChangeProcess <-----------------------+ | |
aChannel.switchProcessTo(tabPromise, identifier) | |
StartCrossProcessRedirect() --->TriggerCrossProcessRedirect | |
browserParent->SendCrossProcessRedirect() +-----------------------------------------------------------------------------------------> ContentChild::RecvCrossProcessRedirect | |
- NS_NewChannelInternal | |
ConnectChannel <---------------------------------------------------------------------------+ConnectParent | |
- processListener->OnChannelReady +------+ | |
| | |
HttpChannelChild::CompleteRedirectSetup <-------------+ | |
RecvCrossProcessRedirectDone <------------------------------------------------------------------+ - CrossProcessRedirectFinished | |
FinishCrossProcessRedirect | |
OnRedirectResult <----------------------------------+ | |
parent->Delete() +---------------------------------------------------------------> RecvDeleteSelf | |
mNextListener = redirectChannel; | |
OnRedirectVerifyCallback <----------------------------------------------------------------------------------------------------------+ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nsHttpChannel HttpChannelParentListener HttpChannelParent HttpChannelChild | |
StartRedirectChannelToURI | |
-AsyncOnChannelRedirect +--------------------------------> RegisterChannel +-------------------------------------> StartRedirect | |
(creates parent side newChannel) (creates mRedirectChannelId) -SendRedirect1Begin +------------------------------> Redirect1Begin | |
-WaitForRedirectCallback -SetupRedirect | |
(suspends channel) (creates newChannel) | |
-ConnectParent(redirectChannelID) | |
ConnectChannel <-------------------------------------+ SendPHttpChannelConstructor(connectArgs) | |
-NS_LinkRedirectChannels | |
-AsyncOnChannelRedirect | |
+ | |
| | |
| | |
v | |
OnRedirectVerifyCallback | |
OnRedirectVerifyCallback <--------------------------------------------------------------------------------------------+ RecvRedirect2Verify <------------------------------------+ -SendRedirect2Verify | |
(resumes original channel) -ContinueRedirect2Verify | |
- OpenRedirectChannel | |
- newChannel->AsyncOpen(listener) | |
+ | |
| | |
| | |
+---> AutoRedirectVetoNotifier +----------------------> OnRedirectResult +------------------------------------------> CompleteRedirect | |
- SendRedirect3Complete +-------------------------------> Redirect3Complete | |
- CompleteRedirectSetup | |
(equivalent of AsyncOpen | |
sets the channel listeners) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment