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

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

From: Philip Jägenstedt via GitHub <sysbot+gh@w3.org>
Date: Fri, 21 Apr 2017 16:29:48 +0000
To: public-webrtc@w3.org
Message-ID: <issues.opened-223434076-1492792186-sysbot+gh@w3.org>
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

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:50 UTC