Closed Bug 1476996 Opened 6 years ago Closed 6 years ago

Implement cross process redirection in Http on the parent process

Categories

(Core :: Networking: HTTP, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox63 --- wontfix
firefox64 --- fixed

People

(Reporter: mayhemer, Assigned: valentin)

References

()

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

See the URL for details.

The idea is to ask for a new process at [1] or somewhere even sooner and register the channel for redirect to get the ID and then suspend it until it is connected from the new content process.

The connection should "just work" except that we need one more thing we don't do now - resume the channel.  

It's easy to add it, since parent connection for "normal redirect" happens before the channel's been open, so no harm done to Suspend() at somewhere around [2] and resume at maybe [3] every time.

[1] https://searchfox.org/mozilla-central/rev/6f86cc3479f80ace97f62634e2c82a483d1ede40/netwerk/protocol/http/HttpChannelParentListener.cpp#68
[2] https://searchfox.org/mozilla-central/rev/88199de427d3c5762b7f3c2a4860c10734abd867/netwerk/protocol/http/HttpChannelParent.cpp#1903
[3] https://searchfox.org/mozilla-central/rev/88199de427d3c5762b7f3c2a4860c10734abd867/netwerk/protocol/http/HttpChannelParent.cpp#789
Depends on: 1476978
Priority: -- → P3
Whiteboard: [necko-triaged]
This is a WIP patch that works.
It redirects a channel to a different content process.
See nsIRedirectProcessChooser.idl and browser_cross_process_redirect.js for the proposed API.
More work needs to go into setting all of the correct attributes on the childChannel, handling failures, and maybe supporting other types of redirects.
Comment on attachment 8998634 [details]
Bug 1476996 - Implement cross process redirection in Http on the parent process

:Nika Layzell (digging out of backlog) has approved the revision.
Attachment #8998634 - Flags: review+
Attachment #8998634 - Attachment description: Bug 1476996 - [WIP] Implement cross process redirection in Http on the parent process → Bug 1476996 - Implement cross process redirection in Http on the parent process
Comment on attachment 8998634 [details]
Bug 1476996 - Implement cross process redirection in Http on the parent process

Daniel Stenberg [:bagder] has approved the revision.
Attachment #8998634 - Flags: review+
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/45605798ecfe
Implement cross process redirection in Http on the parent process r=bagder,nika
Backout by rgurzau@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eb6516c0e7ef
Backed out changeset 45605798ecfe for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE
Backed out changeset 45605798ecfe (bug 1476996) for build bustage at netwerk/protocol/http/HttpChannelParentListener.cpp on a CLOSED TREE

Backout link: https://hg.mozilla.org/integration/autoland/rev/eb6516c0e7ef789e0c90742ab4b0011a69394f7b

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=45605798ecfe97742b9571c04cc151afe5426c19

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=197416303&repo=autoland&lineNumber=14240

Log snippet: 

[task 2018-09-04T17:29:09.546Z] 17:29:09     INFO -  mkdir -p '.deps/'
[task 2018-09-04T17:29:09.547Z] 17:29:09     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/peerconnection'
[task 2018-09-04T17:29:09.547Z] 17:29:09     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/peerconnection'
[task 2018-09-04T17:29:09.547Z] 17:29:09     INFO -  media/webrtc/signaling/src/peerconnection
[task 2018-09-04T17:29:09.548Z] 17:29:09     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/peerconnection'
[task 2018-09-04T17:29:09.548Z] 17:29:09     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/peerconnection'
[task 2018-09-04T17:29:09.548Z] 17:29:09     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/peerconnection'
[task 2018-09-04T17:29:09.556Z] 17:29:09     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:09.556Z] 17:29:09     INFO -  media/webrtc/signaling/src/mediapipeline
[task 2018-09-04T17:29:09.556Z] 17:29:09     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:09.563Z] 17:29:09     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:09.563Z] 17:29:09     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:10.228Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.228Z] 17:29:10     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ --target=i686-linux-gnu -o UnifiedProtocols14.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/ipc/ipdl -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -march=pentium-m -msse -msse2 -mfpmath=sse -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -Werror -I/builds/worker/workspace/build/src/widget/gtk/compat-gtk3 -pthread -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gtk-3.0/unix-print  -MD -MP -MF .deps/UnifiedProtocols14.o.pp   /builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/UnifiedProtocols14.cpp
[task 2018-09-04T17:29:10.229Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.230Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.231Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.232Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.233Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.455Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:10.462Z] 17:29:10     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ --target=i686-linux-gnu -o Unified_cpp_src_mediapipeline0.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DHAVE_UINT64_T -DWEBRTC_POSIX -DWEBRTC_BUILD_LIBEVENT -DWEBRTC_LINUX -DTRACING -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/media/webrtc/signaling/src/mediapipeline -I/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/dom/media -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/media/libyuv/libyuv/include -I/builds/worker/workspace/build/src/media/mtransport -I/builds/worker/workspace/build/src/media/webrtc -I/builds/worker/workspace/build/src/media/webrtc/signaling/src/media-conduit -I/builds/worker/workspace/build/src/media/webrtc/trunk -I/builds/worker/workspace/build/src/netwerk/srtp/src/crypto/include -I/builds/worker/workspace/build/src/netwerk/srtp/src/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -march=pentium-m -msse -msse2 -mfpmath=sse -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -Werror -Wno-error=shadow  -MD -MP -MF .deps/Unified_cpp_src_mediapipeline0.o.pp   /builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline/Unified_cpp_src_mediapipeline0.cpp
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/media/webrtc/signaling/src/mediapipeline'
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http'
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -  /builds/worker/workspace/build/src/sccache2/sccache /builds/worker/workspace/build/src/clang/bin/clang++ --target=i686-linux-gnu -o Unified_cpp_protocol_http1.o -c  -I/builds/worker/workspace/build/src/obj-firefox/dist/stl_wrappers -I/builds/worker/workspace/build/src/obj-firefox/dist/system_wrappers -include /builds/worker/workspace/build/src/config/gcc_hidden.h -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/builds/worker/workspace/build/src/netwerk/protocol/http -I/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http -I/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl/_ipdlheaders -I/builds/worker/workspace/build/src/ipc/chromium/src -I/builds/worker/workspace/build/src/ipc/glue -I/builds/worker/workspace/build/src/dom/base -I/builds/worker/workspace/build/src/netwerk/base -I/builds/worker/workspace/build/src/netwerk/cookie -I/builds/worker/workspace/build/src/security/pkix/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nspr -I/builds/worker/workspace/build/src/obj-firefox/dist/include/nss -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/build/src/obj-firefox/mozilla-config.h -Qunused-arguments -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++1z-compat -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -Wno-return-type-c-linkage -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -march=pentium-m -msse -msse2 -mfpmath=sse -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/build/src/obj-firefox/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -Werror  -MD -MP -MF .deps/Unified_cpp_protocol_http1.o.pp   /builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http/Unified_cpp_protocol_http1.cpp
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -  In file included from /builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http/Unified_cpp_protocol_http1.cpp:11:
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -  /builds/worker/workspace/build/src/netwerk/protocol/http/HttpChannelParentListener.cpp:213:18: error: unused variable 'result' [-Werror,-Wunused-variable]
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -              auto result = neckoParent->SendCrossProcessRedirect(self->mRedirectChannelId,
[task 2018-09-04T17:29:10.464Z] 17:29:10     INFO -                   ^
[task 2018-09-04T17:29:10.465Z] 17:29:10     INFO -  1 error generated.
[task 2018-09-04T17:29:10.465Z] 17:29:10     INFO -  /builds/worker/workspace/build/src/config/rules.mk:1110: recipe for target 'Unified_cpp_protocol_http1.o' failed
[task 2018-09-04T17:29:10.465Z] 17:29:10     INFO -  make[4]: *** [Unified_cpp_protocol_http1.o] Error 1
[task 2018-09-04T17:29:10.465Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/workspace/build/src/obj-firefox/netwerk/protocol/http'
[task 2018-09-04T17:29:10.466Z] 17:29:10     INFO -  make[4]: Entering directory '/builds/worker/workspace/build/src/obj-firefox/ipc/ipdl'
[task 2018-09-04T17:29:10.466Z] 17:29:10     INFO -  make[4]: Leaving directory '/builds/worker/w
Flags: needinfo?(valentin.gosu)
Pushed by valentin.gosu@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/417abd88f307
Implement cross process redirection in Http on the parent process r=bagder,nika
Flags: needinfo?(valentin.gosu)
https://hg.mozilla.org/mozilla-central/rev/417abd88f307
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: