Closed Bug 1616875 Opened 5 years ago Closed 5 years ago

Stop using JSImpl for RTCRtpReceiver

Categories

(Core :: WebRTC: Signaling, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla76
Tracking Status
firefox76 --- fixed

People

(Reporter: bwc, Assigned: bwc)

References

Details

Attachments

(9 files, 2 obsolete 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
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
No description provided.

...code is being moved elsewhere.

Depends on D50395

Depends on D64237

Depends on D64241

Attachment #9128970 - Attachment description: Bug 1616875: Remove code that was compensating for inconsistencies between webrtc.org's timestamps, and JS timestamps. Also, remove a few bits of indirection on GetRtpSources; that's all going to go directly to RTCRtpReceiver now. None of this... → Bug 1616875: Remove code that we will not need to move to RTCRtpReceiver.

This means we won't have to re-implement all of our JSImpl workarounds in c++.
Also, rename a variable in a way that made it easier to read this code.

Attachment #9128971 - Attachment description: Bug 1616875: Create RTCRtpReceiver in c++, and move code into it from both JSImpl and other places in c++. Also, move some code from JSImpl to PeerConnectionImpl. → Bug 1616875: Implement RTCRtpReceiver in c++
Attachment #9128979 - Attachment is obsolete: true
Attachment #9128971 - Attachment description: Bug 1616875: Implement RTCRtpReceiver in c++ → Bug 1616875: Create RTCRtpReceiver in c++, and move code into it from both JSImpl and other places in c++. Also, move some code from JSImpl to PeerConnectionImpl.

Basic try run looks good. Going to push a more thorough one now.

This essentially implements the "queue a task" step required by the spec, which
ensures that if JS checks stats multiple times without relinquishing the event
loop, it will see the same thing each time.

Depends on D64241

Attachment #9128976 - Attachment is obsolete: true

Depends on D64468

Try push looks fine.

Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3bad18c7a567 Use timestamps for SSRC/CSRC statistics that are consistent with JS timestamps. r=ng https://hg.mozilla.org/integration/autoland/rev/ebdad7b7b632 Remove code that we will not need to move to RTCRtpReceiver. r=ng,smaug https://hg.mozilla.org/integration/autoland/rev/2c21627f3678 Create RTCRtpReceiver in c++, and move code into it from both JSImpl and other places in c++. Also, move some code from JSImpl to PeerConnectionImpl. r=jib,smaug https://hg.mozilla.org/integration/autoland/rev/36892aed2a94 Add some functions to PeerConnectionObserver that PeerConnectionImpl can use to fire track/stream association events. r=jib,smaug https://hg.mozilla.org/integration/autoland/rev/f5a201261e83 Move some receiver-related testing functions from RTCPeerConnection to RTCRtpReceiver. r=ng,smaug https://hg.mozilla.org/integration/autoland/rev/ac73b2ce3e20 Remove some unnecessary code. r=mjf https://hg.mozilla.org/integration/autoland/rev/a301ce4e5571 Make this mochitest use the right kind of timestamps, and remove some unused code. r=ng https://hg.mozilla.org/integration/autoland/rev/96b3a322e605 Make RtpSourceObserver update stats on main thread, and simplify. r=ng https://hg.mozilla.org/integration/autoland/rev/92ed87a5add4 Make this work with gtest. r=ng

Backed out 9 changesets (bug 1616875) for bustages complaining about RTCRtpReceiver.h

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=autoland&searchStr=os%2Cx%2Ccross%2Ccompiled%2Casan%2Cbuild-macosx64-asan-fuzzing%2Fopt%2C%28bof%29&fromchange=8455e50002a9da0f310d23bca0c11149570a49f3&tochange=8b3136dd8a74f74e937017a96869520b3dd3a25a&selectedJob=294063224

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

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=294063224&repo=autoland&lineNumber=22138

[task 2020-03-20T14:26:08.415Z] 14:26:08     INFO -  make[4]: Leaving directory '/builds/worker/workspace/obj-build/dom/html'
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  make[4]: Entering directory '/builds/worker/workspace/obj-build/dom/bindings'
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang++ -isysroot /builds/worker/checkouts/gecko/MacOSX10.11.sdk -std=gnu++17 --target=x86_64-apple-darwin -o UnifiedBindings16.o -c  -fvisibility=hidden -fvisibility-inlines-hidden -U_FORTIFY_SOURCE -fno-common -DNDEBUG=1 -DTRIMMED=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DOS_POSIX=1 -DOS_MACOSX=1 -DHAVE_SIDEBAR -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/dom/bindings -I/builds/worker/workspace/obj-build/dom/bindings -I/builds/worker/workspace/obj-build/dist/include/mozilla/dom -I/builds/worker/checkouts/gecko/dom/base -I/builds/worker/checkouts/gecko/dom/battery -I/builds/worker/checkouts/gecko/dom/canvas -I/builds/worker/checkouts/gecko/dom/geolocation -I/builds/worker/checkouts/gecko/dom/html -I/builds/worker/checkouts/gecko/dom/indexedDB -I/builds/worker/checkouts/gecko/dom/media/webaudio -I/builds/worker/checkouts/gecko/dom/media/webspeech/recognition -I/builds/worker/checkouts/gecko/dom/svg -I/builds/worker/checkouts/gecko/dom/xml -I/builds/worker/checkouts/gecko/dom/xslt/base -I/builds/worker/checkouts/gecko/dom/xslt/xpath -I/builds/worker/checkouts/gecko/dom/xul -I/builds/worker/checkouts/gecko/js/xpconnect/src -I/builds/worker/checkouts/gecko/js/xpconnect/wrappers -I/builds/worker/checkouts/gecko/layout/generic -I/builds/worker/checkouts/gecko/layout/style -I/builds/worker/checkouts/gecko/layout/xul/tree -I/builds/worker/checkouts/gecko/media/mtransport -I/builds/worker/checkouts/gecko/media/webrtc -I/builds/worker/checkouts/gecko/media/webrtc/signaling/src/common/time_profiling -I/builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection -I/builds/worker/checkouts/gecko/media/webrtc/trunk -I/builds/worker/checkouts/gecko/netwerk/base -I/builds/worker/checkouts/gecko/third_party/msgpack/include -I/builds/worker/workspace/obj-build/ipc/ipdl/_ipdlheaders -I/builds/worker/checkouts/gecko/ipc/chromium/src -I/builds/worker/checkouts/gecko/ipc/glue -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 -fPIC -DMOZILLA_CLIENT -include /builds/worker/workspace/obj-build/mozilla-config.h -Qunused-arguments -Qunused-arguments -Wall -Wbitfield-enum-conversion -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 -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Werror=non-literal-null-conversion -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-unknown-warning-option -fno-sized-deallocation -fno-aligned-new -fsanitize=address -fcrash-diagnostics-dir=/builds/worker/artifacts -fcrash-diagnostics-dir=/builds/worker/artifacts -fno-exceptions -fno-strict-aliasing -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -fno-omit-frame-pointer -funwind-tables -Werror -Wno-error=shadow -Wno-maybe-uninitialized -fexperimental-new-pass-manager  -MD -MP -MF .deps/UnifiedBindings16.o.pp   UnifiedBindings16.cpp
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.224Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:81:30: error: implicit instantiation of undefined template 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >'
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -      std::vector<std::string> mStreamIds;
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -                               ^
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.224Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:85:43: error: implicit instantiation of undefined template 'std::__1::vector<RefPtr<mozilla::dom::MediaStreamTrack>, std::__1::allocator<RefPtr<mozilla::dom::MediaStreamTrack> > >'
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -      std::vector<RefPtr<MediaStreamTrack>> mTracksToMute;
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -                                            ^
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.224Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:86:36: error: implicit instantiation of undefined template 'std::__1::vector<mozilla::dom::RTCRtpReceiver::StreamAssociation, std::__1::allocator<mozilla::dom::RTCRtpReceiver::StreamAssociation> >'
[task 2020-03-20T14:26:09.224Z] 14:26:09     INFO -      std::vector<StreamAssociation> mStreamAssociationsRemoved;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                                     ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.225Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:87:36: error: implicit instantiation of undefined template 'std::__1::vector<mozilla::dom::RTCRtpReceiver::StreamAssociation, std::__1::allocator<mozilla::dom::RTCRtpReceiver::StreamAssociation> >'
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -      std::vector<StreamAssociation> mStreamAssociationsAdded;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                        
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.225Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:88:33: error: implicit instantiation of undefined template 'std::__1::vector<mozilla::dom::RTCRtpReceiver::TrackEventInfo, std::__1::allocator<mozilla::dom::RTCRtpReceiver::TrackEventInfo> >'
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -      std::vector<TrackEventInfo> mTrackEvents;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                                  ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.225Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:126:28: error: implicit instantiation of undefined template 'std::__1::vector<std::__1::basic_string<char>, std::__1::allocator<std::__1::basic_string<char> > >'
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -    std::vector<std::string> mStreamIds;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/fetches/clang/bin/../include/c++/v1/iosfwd:216:28: note: template is declared here
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  class _LIBCPP_TEMPLATE_VIS vector;
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -                             ^
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from UnifiedBindings16.cpp:2:
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  In file included from /builds/worker/workspace/obj-build/dom/bindings/RTCRtpReceiverBinding.cpp:3:
[task 2020-03-20T14:26:09.225Z] 14:26:09    ERROR -  /builds/worker/checkouts/gecko/media/webrtc/signaling/src/peerconnection/RTCRtpReceiver.h:46:3: error: static_cast from 'mozilla::dom::RTCRtpReceiver *' to 'nsISupports *', which are not related by inheritance, is not allowed
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -    NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(RTCRtpReceiver)
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/workspace/obj-build/dist/include/nsCycleCollectionParticipant.h:711:3: note: expanded from macro 'NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS'
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -    NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(_class, _class)
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -  /builds/worker/workspace/obj-build/dist/include/nsCycleCollectionParticipant.h:652:5: note: expanded from macro 'NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS'
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -      NS_DECL_CYCLE_COLLECTION_CLASS_BODY(_class, _base)                         \
[task 2020-03-20T14:26:09.225Z] 14:26:09     INFO -      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[task 2020-03-20T14:26:09.228Z] 14:26:09     INFO -  /builds/worker/workspace/obj-build/dist/include/nsCycleCollectionParticipant.h:575:3: note: expanded from macro 'NS_DECL_CYCLE_COLLECTION_CLASS_BODY'
[task 2020-03-20T14:26:09.228Z] 14:26:09     INFO -    NS_DECL_CYCLE_COLLECTION_CLASS_BODY_NO_UNLINK(_class, _base) \
...
...
Flags: needinfo?(docfaraday)
Flags: needinfo?(docfaraday)
Pushed by bcampen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a7226c3a2dc Use timestamps for SSRC/CSRC statistics that are consistent with JS timestamps. r=ng https://hg.mozilla.org/integration/autoland/rev/bd5d9537f2fc Remove code that we will not need to move to RTCRtpReceiver. r=ng,smaug https://hg.mozilla.org/integration/autoland/rev/459e8e135ca8 Create RTCRtpReceiver in c++, and move code into it from both JSImpl and other places in c++. Also, move some code from JSImpl to PeerConnectionImpl. r=jib,smaug https://hg.mozilla.org/integration/autoland/rev/72026115ce3e Add some functions to PeerConnectionObserver that PeerConnectionImpl can use to fire track/stream association events. r=jib,smaug https://hg.mozilla.org/integration/autoland/rev/f019798505f7 Move some receiver-related testing functions from RTCPeerConnection to RTCRtpReceiver. r=ng,smaug https://hg.mozilla.org/integration/autoland/rev/ebc3e7947795 Remove some unnecessary code. r=mjf https://hg.mozilla.org/integration/autoland/rev/e236eb4ef120 Make this mochitest use the right kind of timestamps, and remove some unused code. r=ng https://hg.mozilla.org/integration/autoland/rev/db952796534a Make RtpSourceObserver update stats on main thread, and simplify. r=ng https://hg.mozilla.org/integration/autoland/rev/6ed285183b09 Make this work with gtest. r=ng
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: