W3C home > Mailing lists > Public > public-webrtc@w3.org > June 2012

Re: Validity period of createOffer() offers.

From: Cullen Jennings <fluffy@cisco.com>
Date: Sun, 10 Jun 2012 10:21:25 -0400
Cc: public-webrtc@w3.org
Message-Id: <1C84C359-B65E-401B-869C-D1BA0950F3F8@cisco.com>
To: Eric Rescorla <ekr@rtfm.com>

On Jun 1, 2012, at 16:55 , Eric Rescorla wrote:

> The specification explicitly states that the following snippet is
> guaranteed to succeed (S 4.1.11.2):
> 
>  pc.createOffer(function(offer) {
>    pc.setLocalDescription("offer", offer);
>  });
> 
> 
> Now consider the following snippet:
> 
>  pc.createOffer(function(offer) {
>    setTimeout(function() {
>         pc.setLocalDescription("offer", offer);
>      }, 1000);
>  });
> 
> The spec suggests that this is not guaranteed to succeed, but is it
> reasonable for the application programmer to expect it to
> succeed? Phrased differently, would an implementation which refused
> any setLocalDescription() outside of the createOffer() callback
> even if no other conditions had changed be conformant?
> 
> -Ekr

Yes, I think it is reasonable for this to fail. The issues is when can the browser free resources allocated in the createOffer. Once scheme is to free them at the end of the call back. In that cases, if they got allocated by something else, the setLocal is going to fail. 

> 
Received on Sunday, 10 June 2012 14:21:45 UTC

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