Bug 98149

Summary: MediaStream API: RTCPeerConnection should send down its handler via the FrameLoaderClient directly after creation.
Product: WebKit Reporter: Tommy Widenflycht <tommyw>
Component: WebCore Misc.Assignee: Tommy Widenflycht <tommyw>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dglazkov, eric.carlson, feature-media-reviews, fishd, jamesr, japhet, tkent+wkapi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 56459    
Attachments:
Description Flags
Patch
abarth: review+
Patch for landing none

Tommy Widenflycht
Reported 2012-10-02 04:57:55 PDT
The chromium implementation needs to know which Frame created a PeerConnection so that the right housekeeping can take place correctly.
Attachments
Patch (11.35 KB, patch)
2012-10-02 05:02 PDT, Tommy Widenflycht
abarth: review+
Patch for landing (11.33 KB, patch)
2012-10-03 02:11 PDT, Tommy Widenflycht
no flags
Tommy Widenflycht
Comment 1 2012-10-02 05:02:49 PDT
Tommy Widenflycht
Comment 2 2012-10-02 05:03:26 PDT
Trying this way instead.
WebKit Review Bot
Comment 3 2012-10-02 05:04:40 PDT
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.
Adam Barth
Comment 4 2012-10-02 09:55:36 PDT
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.
Tommy Widenflycht
Comment 5 2012-10-03 02:08:17 PDT
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.
Tommy Widenflycht
Comment 6 2012-10-03 02:11:23 PDT
Created attachment 166830 [details] Patch for landing
Adam Barth
Comment 7 2012-10-03 02:29:58 PDT
Comment on attachment 166830 [details] Patch for landing ok
WebKit Review Bot
Comment 8 2012-10-03 02:52:07 PDT
Comment on attachment 166830 [details] Patch for landing Clearing flags on attachment: 166830 Committed r130270: <http://trac.webkit.org/changeset/130270>
Note You need to log in before you can comment on or make changes to this bug.