-
Notifications
You must be signed in to change notification settings - Fork 119
Description
In the current specification, current_local_description is described as an attribute that returns the content of the [[CurrentLocalDescription]] slot.
Returning an object in Javascript is basically passing a reference, not cloning the value.
So - in the current model, if we have:
x = pc.current_local_description
... time passes
a new candidate is added
... time passes
what is the value of x.sdp? does it include the new candidate or not?
This came up while hunting for a thread access issue inside WebRTC; it made it clear to me that life would be much simpler if those accessors returned a copy of the current state of [[LocalDescription]], and did not change after returning. But that is not the way attributes usually work.
What should we intend here?
(all the attributes of an RTCSessionDescription are readonly, so the Javascript side can't change it. The question is whether the platform can change it.)