RESOLVED FIXED 164670
MediaStreamPrivate::create should take vectors of Ref
https://bugs.webkit.org/show_bug.cgi?id=164670
Summary MediaStreamPrivate::create should take vectors of Ref
youenn fablet
Reported 2016-11-11 18:55:22 PST
It currently takes vector of RefPtr
Attachments
Patch (10.76 KB, patch)
2016-11-11 18:58 PST, youenn fablet
no flags
Patch (10.81 KB, patch)
2016-11-12 09:30 PST, youenn fablet
no flags
Patch for landing (10.83 KB, patch)
2016-11-14 09:13 PST, youenn fablet
no flags
youenn fablet
Comment 1 2016-11-11 18:58:32 PST
youenn fablet
Comment 2 2016-11-12 09:30:25 PST
Sam Weinig
Comment 3 2016-11-12 20:30:21 PST
Comment on attachment 294615 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=294615&action=review > Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.cpp:54 > + m_stream = MediaStream::create(*context.scriptExecutionContext(), MediaStreamPrivate::create(audioSources, Vector<Ref<RealtimeMediaSource>>())); Depending on the overloading story here, you can probably use { }, for the empty Vector. > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:51 > tracks.reserveCapacity(audioSources.size() + videoSources.size()); This should use reserveInitialCapacity > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:54 > + tracks.append(MediaStreamTrackPrivate::create(source.copyRef())); This can be an uncheckedAppend(). > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:57 > + tracks.append(MediaStreamTrackPrivate::create(source.copyRef())); This can be an uncheckedAppend().
youenn fablet
Comment 4 2016-11-14 09:13:17 PST
Created attachment 294704 [details] Patch for landing
youenn fablet
Comment 5 2016-11-14 09:19:39 PST
Thanks for the review. (In reply to comment #3) > Comment on attachment 294615 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=294615&action=review > > > Source/WebCore/Modules/webaudio/MediaStreamAudioDestinationNode.cpp:54 > > + m_stream = MediaStream::create(*context.scriptExecutionContext(), MediaStreamPrivate::create(audioSources, Vector<Ref<RealtimeMediaSource>>())); > > Depending on the overloading story here, you can probably use { }, for the > empty Vector. Done > > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:51 > > tracks.reserveCapacity(audioSources.size() + videoSources.size()); > > This should use reserveInitialCapacity Done > > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:54 > > + tracks.append(MediaStreamTrackPrivate::create(source.copyRef())); > > This can be an uncheckedAppend(). Done > > Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp:57 > > + tracks.append(MediaStreamTrackPrivate::create(source.copyRef())); > > This can be an uncheckedAppend(). Done
WebKit Commit Bot
Comment 6 2016-11-14 09:49:19 PST
Comment on attachment 294704 [details] Patch for landing Clearing flags on attachment: 294704 Committed r208687: <http://trac.webkit.org/changeset/208687>
WebKit Commit Bot
Comment 7 2016-11-14 09:49:22 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.