Re: Validity period of createOffer() offers.

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