Bug 121103 - RTCPeerConnection objects must have the same lifetime as Window
Summary: RTCPeerConnection objects must have the same lifetime as Window
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: BlinkMergeCandidate
Depends on:
Blocks: 121101
  Show dependency treegraph
 
Reported: 2013-09-10 11:09 PDT by Eric Carlson
Modified: 2013-09-13 14:27 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Carlson 2013-09-10 11:09:44 PDT
Consider merging https://chromium.googlesource.com/chromium/blink/+/d2c15b9a56ace790cbf0e71507034ebd64da0ff6

The spec states that:
"A Window object has a strong reference to any RTCPeerConnection objects created
from the constructor whose global object is that Window object."
Which means that RTCPC objects should never be garbage collected.
Comment 1 Sam Weinig 2013-09-10 16:07:07 PDT
That's a bit mysterious.  What is the observable symptom this bug fixes?
Comment 2 Eric Carlson 2013-09-13 13:20:41 PDT
(In reply to comment #1)
> That's a bit mysterious.  What is the observable symptom this bug fixes?

I asked Adam Bergkvist, one of the spec authors, about that section of the spec and he said:

    The RTCPeerConnection Garbage Collection section doesn't make sense to me either. 
    I don't think that particular section has been touched since the w3c forked the 
    WHATWG WebRTC spec.

    My initial thinking is that the RTCPeerConnection object should be protected when 
    certain listeners are attached; similar to RTCDataChannel [1] (which mimics WebSocket).

So I am marking this as WONTFIX and we can revisit the issue when the spec is updated.
Comment 3 Sam Weinig 2013-09-13 13:28:55 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > That's a bit mysterious.  What is the observable symptom this bug fixes?
> 
> I asked Adam Bergkvist, one of the spec authors, about that section of the spec and he said:
> 
>     The RTCPeerConnection Garbage Collection section doesn't make sense to me either. 
>     I don't think that particular section has been touched since the w3c forked the 
>     WHATWG WebRTC spec.
> 
>     My initial thinking is that the RTCPeerConnection object should be protected when 
>     certain listeners are attached; similar to RTCDataChannel [1] (which mimics WebSocket).
> 
> So I am marking this as WONTFIX and we can revisit the issue when the spec is updated.

Just to throw a wrench in the mix, it looks like the blink patch doesn't actually do what it states, it looks like what it does is change things so RTCPeerConnections won't get GC'd while the connection is not stopped.  We may want that behavior, but I am not sure.