Bug 99308 - MediaStream API: Add better RTCPeerConnectionHandler creation logic
Summary: MediaStream API: Add better RTCPeerConnectionHandler creation logic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Tommy Widenflycht
URL:
Keywords:
Depends on:
Blocks: 56459
  Show dependency treegraph
 
Reported: 2012-10-15 04:45 PDT by Tommy Widenflycht
Modified: 2012-10-18 05:39 PDT (History)
6 users (show)

See Also:


Attachments
Patch (7.59 KB, patch)
2012-10-15 04:52 PDT, Tommy Widenflycht
no flags Details | Formatted Diff | Diff
Patch (8.79 KB, patch)
2012-10-17 00:48 PDT, Tommy Widenflycht
abarth: review+
abarth: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (8.77 KB, patch)
2012-10-18 02:07 PDT, Tommy Widenflycht
no flags Details | Formatted Diff | Diff
Patch for landing (8.74 KB, patch)
2012-10-18 02:10 PDT, Tommy Widenflycht
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>