Closed Bug 1816918 Opened 2 years ago Closed 2 years ago

Implement WebTransport cleanup on CSP error

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox113 --- fixed

People

(Reporter: jesup, Assigned: smayya)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

Specifically handle CSP errors per the spec. May require transport API addtions (haven't checked).
https://w3c.github.io/webtransport/#webtransport-constructor in initialize WebTransport over HTTP, steps 5.1-5.3

Blocks: 1816921
Severity: -- → S3
Priority: -- → P3
Whiteboard: [necko-triaged]
Assignee: nobody → smayya
Attachment #9324133 - Attachment description: WIP: Bug 1816918 - Implement WebTransport cleanup on CSP error → Bug 1816918 - pass ClientInfo via IPC while creating webtransport session. r=#necko,jesup

Something strange happened with this push, the bot did not made the comment that this landed on autoland, in lando it says that this push has "failed to land" and there are no builds/jobs on the push. Anyway, that is just some additional info.
This was backed out because of build bustages on WebTransportParent.cpp

[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/dom/webtransport/parent'
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/gcc/bin/g++ --sysroot /builds/worker/fetches/sysroot-x86_64-linux-gnu -std=gnu++17 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/7.5.0 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu/c++/7.5.0 -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/x86_64-linux-gnu -isystem /builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include -o Unified_cpp_webtransport_parent0.o -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -I/builds/worker/workspace/obj-build/dist/system_wrappers -include /builds/worker/checkouts/gecko/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DDEBUG=1 -DOS_POSIX=1 -DOS_LINUX=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/dom/webtransport/parent -I/builds/worker/workspace/obj-build/dom/webtransport/parent -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/netwerk/base -I/builds/worker/checkouts/gecko/netwerk/protocol/http -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -D_GLIBCXX_USE_CXX11_ABI=0 -fno-sized-deallocation -fno-aligned-new -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gdwarf-4 -freorder-blocks -Os -fno-omit-frame-pointer -funwind-tables -Werror -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wno-error=deprecated -Wduplicated-cond -Wimplicit-fallthrough -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-overflow=2 -Wno-psabi -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/Unified_cpp_webtransport_parent0.o.pp   Unified_cpp_webtransport_parent0.cpp
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -  In file included from Unified_cpp_webtransport_parent0.cpp:2:0:
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp: In member function 'void mozilla::dom::WebTransportParent::Create(const nsAString&, nsIPrincipal*, const mozilla::dom::IPCClientInfo&, const bool&, const bool&, const uint32_t&, mozilla::dom::PWebTransportParent::Endpoint<mozilla::dom::PWebTransportParent>&&, std::function<void(std::tuple<const nsresult&, const unsigned char&>)>&&)':
[task 2023-03-27T14:42:46.932Z] 14:42:46    ERROR -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:93:8: error: 'aClientInfo' was not declared in this scope
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -          aClientInfo] {
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -          ^~~~~~~~~~~
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -  In file included from /builds/worker/workspace/obj-build/dist/include/mozilla/Assertions.h:20:0,
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -                   from /builds/worker/workspace/obj-build/dist/include/mozilla/AlreadyAddRefed.h:14,
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -                   from /builds/worker/workspace/obj-build/dist/include/mozilla/RefPtr.h:10,
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -                   from /builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders/mozilla/dom/ClientIPCTypes.h:11,
[task 2023-03-27T14:42:46.932Z] 14:42:46     INFO -                   from /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.h:11,
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                   from /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:7,
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                   from Unified_cpp_webtransport_parent0.cpp:2:
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp: In lambda function:
[task 2023-03-27T14:42:46.933Z] 14:42:46    ERROR -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:97:42: error: 'aClientInfo' is not captured
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                   mozilla::Some(ClientInfo(aClientInfo))))) {
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                                            ^
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  /builds/worker/workspace/obj-build/dist/include/mozilla/Likely.h:17:48: note: in definition of macro 'MOZ_UNLIKELY'
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -   #  define MOZ_UNLIKELY(x) (__builtin_expect(!!(x), 0))
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                                                  ^
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:95:13: note: in expansion of macro 'NS_FAILED'
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -           if (NS_FAILED(self->mWebTransport->AsyncConnectWithClient(
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -               ^
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  In file included from Unified_cpp_webtransport_parent0.cpp:2:0:
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:93:19: note: the lambda has no capture-default
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -          aClientInfo] {
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -                     ^
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  /builds/worker/checkouts/gecko/dom/webtransport/parent/WebTransportParent.cpp:93:8: note: '<typeprefixerror>aClientInfo' declared here
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -          aClientInfo] {
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -          ^~~~~~~~~~~
[task 2023-03-27T14:42:46.933Z] 14:42:46    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:670: Unified_cpp_webtransport_parent0.o] Error 1
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/dom/webtransport/parent'
[task 2023-03-27T14:42:46.933Z] 14:42:46     INFO -  gmake[4]: Target 'target-objects' not remade because of errors.
[task 2023-03-27T14:42:46.933Z] 14:42:46    ERROR -  gmake[3]: *** [/builds/worker/checkouts/gecko/config/recurse.mk:72: dom/webtransport/parent/target-objects] Error 2
[task 2023-03-27T14:42:46.944Z] 14:42:46     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/dom/xslt/xpath'
Flags: needinfo?(smayya)
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/db2b968157d6 pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2ce4fba56cf7 pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup

Backed out for causing bustage on WebTransportParent.cpp

Backout link

Push with failures

Failure log

Flags: needinfo?(smayya)
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9fda7af76207 pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup

Please also fix these perma failures before relanding: https://treeherder.mozilla.org/logviewer?job_id=410753236&repo=autoland
FATAL ERROR: Non-local network connections are disabled and a connection attempt to mail.google.com (173.194.194.19) was made.

Flags: needinfo?(smayya)
Pushed by smayya@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4df27cebeeea pass ClientInfo via IPC while creating webtransport session. r=necko-reviewers,jesup
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: