W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > April 2017

Re: [webrtc-pc] Use [SameObject] for the FrozenArray<T> attributes that never change

From: henbos via GitHub <sysbot+gh@w3.org>
Date: Tue, 25 Apr 2017 08:09:17 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-296953619-1493107756-sysbot+gh@w3.org>
Considering _dictionaries are always passed by value_ when passed to/from a platform object (https://www.w3.org/TR/WebIDL-1/#idl-dictionaries) such as RTCCertificate, `sequence<RTCDtlsFingerprint> getFingerprints()` makes the most sense to me. Freezing the elements and using [SameObject] would make sense for interfaces where we can use the same reference every time. Doing so here would seem contradictory to what dictionaries are supposed to be.

Similarly it would make sense to replace `static readonly attribute FrozenArray<RTCIceServer> defaultIceServers()` with `static sequence<RTCIceServer> getDefaultIceServers()` because RTCIceServer is a dictionary. According to https://developer.microsoft.com/en-us/microsoft-edge/platform/catalog/?page=1&q=RTCPeerConnection this is not implemented yet and would be easy to change.

The `readonly attribute FrozenArray<MediaStream> streams` case makes sense because MediaStream is an interface.

Shall I create a PR?

GitHub Notification of comment by henbos
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1138#issuecomment-296953619 using your GitHub account
Received on Tuesday, 25 April 2017 08:09:24 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:40 UTC