Bug 99308

Summary: MediaStream API: Add better RTCPeerConnectionHandler creation logic
Product: WebKit Reporter: Tommy Widenflycht <tommyw>
Component: WebCore Misc.Assignee: Tommy Widenflycht <tommyw>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, eric.carlson, eric, feature-media-reviews, hta, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 56459    
Attachments:
Description Flags
Patch
none
Patch
abarth: review+, abarth: commit-queue-
Patch for landing
none
Patch for landing none

Description Tommy Widenflycht 2012-10-15 04:45:12 PDT
Make sure that if the RTCPeerConnectionHandler can't be fully initialized let the RTCPeerConnection constructor throw an exception.
Comment 1 Tommy Widenflycht 2012-10-15 04:52:26 PDT
Created attachment 168680 [details]
Patch
Comment 2 Tommy Widenflycht 2012-10-17 00:48:47 PDT
Created attachment 169111 [details]
Patch
Comment 3 Adam Barth 2012-10-17 08:53:43 PDT
Comment on attachment 169111 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=169111&action=review

> Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:71
> +        return adoptPtr<RTCPeerConnectionHandler>(0);

You can just return nullptr (or at least PassOwnPtr<RTCPeerConnectionHandler>() if that doesn't work).
Comment 4 Tommy Widenflycht 2012-10-18 02:07:13 PDT
Created attachment 169370 [details]
Patch for landing
Comment 5 Tommy Widenflycht 2012-10-18 02:10:44 PDT
Created attachment 169371 [details]
Patch for landing
Comment 6 Tommy Widenflycht 2012-10-18 03:18:48 PDT
(In reply to comment #3)
> (From update of attachment 169111 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=169111&action=review
> 
> > Source/WebCore/platform/mediastream/chromium/RTCPeerConnectionHandlerChromium.cpp:71
> > +        return adoptPtr<RTCPeerConnectionHandler>(0);
> 
> You can just return nullptr (or at least PassOwnPtr<RTCPeerConnectionHandler>() if that doesn't work).

Ahh, that's the reason the old return 0; doesn't work anymore. Nice.
Comment 7 WebKit Review Bot 2012-10-18 03:23:49 PDT
Comment on attachment 169371 [details]
Patch for landing

Clearing flags on attachment: 169371

Committed r131721: <http://trac.webkit.org/changeset/131721>