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

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