The chromium implementation needs to know which Frame created a PeerConnection so that the right housekeeping can take place correctly.
Created attachment 166673 [details] Patch
Trying this way instead.
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Comment on attachment 166673 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166673&action=review > Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:139 > + if (!document || !(document->frame())) { document will always be non-0 here. > Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:61 > +WebKit::WebRTCPeerConnectionHandler* RTCPeerConnectionHandlerChromium::toWebRTCPeerConnectionHandler(RTCPeerConnectionHandler* handler) > +{ > + return static_cast<RTCPeerConnectionHandlerChromium*>(handler)->m_webHandler.get(); > +} I probably would have just added a public accessor for m_webHandler and had FrameLoaderClientImpl do the static_cast, but this is ok too.
Comment on attachment 166673 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=166673&action=review >> Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp:139 >> + if (!document || !(document->frame())) { > > document will always be non-0 here. Removed check for empty document. >> Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:61 >> +} > > I probably would have just added a public accessor for m_webHandler and had FrameLoaderClientImpl do the static_cast, but this is ok too. RTCPeerConnectionHandler doesn't know anything about any private implementations, neither should it I think, so I am keeping it like this.
Created attachment 166830 [details] Patch for landing
Comment on attachment 166830 [details] Patch for landing ok
Comment on attachment 166830 [details] Patch for landing Clearing flags on attachment: 166830 Committed r130270: <http://trac.webkit.org/changeset/130270>