Open
Bug 1368239
Opened 7 years ago
Updated 2 years ago
Allow optimization of parent 'physical channel' job during e10s redirects
Categories
(Core :: Networking, enhancement, P3)
Core
Networking
Tracking
()
NEW
People
(Reporter: mayhemer, Unassigned)
References
Details
(Whiteboard: [necko-triaged])
Some protocols implement e10s data delivery a different way than sending data from OnDataAvailable gathered on the parent to the child as strings or buffers. Examples are file: and soon moz-extension: which both use remote open from child and work with a file descriptor or a remote stream. There is no 'parent' side as in case of http: or ftp:. Both are allowed to be redirected-to from http. Hence, are obligated to implement nsIChildChannel and nsIParentChannel interfaces in at least that minimal way as file channels do. For such protocols the biggest disadvantage now is that we still open the parent 'physical channel' when the redirect is about to happen. The file: parent channel cancels it later by throwing from OnStartRequest. Currently there is no way, no information, that we may skip opening the parent channel. I don't have a clear idea of how to do this right now, options: - nsIRedirectResultListener may check the registered nsIParentChannel whether to prevent opening the physical channel (new methods on those two interfaces needed) - tell the redirect target schema protocol handler that the 'physical channel' is for an e10s redirect-to (via some load-flag or something), so that it can instruct its channel to just 'do nothing' at all (that it's just being a placeholder) Note that we need this placeholder to do security checking. I'd probably prefer the option 2. (Yes, sorry, this all is really complicated...)
Reporter | ||
Updated•7 years ago
|
Summary: Allow optimization of 'physical parent' channel job during e10s redirects → Allow optimization of parent 'physical channel' job during e10s redirects
Updated•7 years ago
|
Reporter | ||
Comment 1•7 years ago
|
||
Looking more in detail at the code, I think HttpChannelParent::RecvRedirect2Verify should ask the target parent channel (redirectParentChannel at [1] or [2]) if the redirect source channel (this->mChannel being nsHttpChannel that got 30X) should open the target channel (a channel instance going to the target location) with AsyncOpen or not (i.e. when child will do the work instead). [1] https://hg.mozilla.org/mozilla-central/annotate/8486950bd91878bf077a9ac33cb3c018288fe518/netwerk/protocol/http/HttpChannelParent.cpp#l1011 [2] https://hg.mozilla.org/mozilla-central/annotate/8486950bd91878bf077a9ac33cb3c018288fe518/netwerk/protocol/http/HttpChannelParent.cpp#l1084
Reporter | ||
Comment 2•7 years ago
|
||
This means to add: [infallible] reaonly bool nsIParentChannel.shouldOpenRedirectTargetChannel void nsIParentRedirectingChannel.dontOpenRedirectTargetChannel()
Comment 3•7 years ago
|
||
Bulk priority update: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Updated•7 years ago
|
Priority: P1 → P3
Whiteboard: [necko-active]
Updated•7 years ago
|
Whiteboard: [necko-triaged]
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•