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

foolip has just created a new issue for https://github.com/w3c/webrtc-pc:

== Use [SameObject] for the FrozenArray<T> attributes that never change ==
These are the readonly attributes of type `FrozenArray<T>` in the spec:
* [RTCPeerConnection](https://w3c.github.io/webrtc-pc/#interface-definition)'s `static readonly attribute FrozenArray<RTCIceServer> defaultIceServers`
* [RTCCertificate](https://w3c.github.io/webrtc-pc/#rtccertificate-interface)'s `readonly attribute FrozenArray<RTCDtlsFingerprint> fingerprints`
* [RTCTrackEvent]'s `readonly attribute FrozenArray<MediaStream> streams`

These seem like they will always return the same value. Documenting this with [SameObject] makes this obvious an means that tests can `assert_equals(certificate.fingerprints, certificate.fingerprints)` and similar, something that cannot be assumed from the current spec.

@henbos 

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1138 using your GitHub account

Received on Friday, 21 April 2017 16:29:55 UTC