Bug 169709 - Follow-up on comments for bug 169664
Summary: Follow-up on comments for bug 169664
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 169662
  Show dependency treegraph
 
Reported: 2017-03-15 15:43 PDT by Jon Lee
Modified: 2017-03-22 18:54 PDT (History)
3 users (show)

See Also:


Attachments
Patch (4.63 KB, patch)
2017-03-19 21:30 PDT, Jon Lee
youennf: review+
youennf: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (4.53 KB, patch)
2017-03-20 15:01 PDT, Jon Lee
no flags Details | Formatted Diff | Diff
Patch for landing (4.53 KB, patch)
2017-03-20 19:10 PDT, Jon Lee
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Lee 2017-03-15 15:43:33 PDT
From Youenn:
> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:865
> +    Vector<RTCIceTransportState> transportStates;

I know this is untouched code.
Would you be able to use reserveInitialCapacity/uncheckedAppend

> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:870
> +    m_peerConnection.updateIceConnectionState(static_cast<RTCIceConnectionState>(derivedState));

This looks bad, deriveAggregatedIceConnectionState should really be changed to return RTCIceConnectionState.
Comment 1 Jon Lee 2017-03-19 12:48:37 PDT
(In reply to comment #0)
> From Youenn:
> > Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:865
> > +    Vector<RTCIceTransportState> transportStates;
> 
> I know this is untouched code.
> Would you be able to use reserveInitialCapacity/uncheckedAppend
> 
> > Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:870
> > +    m_peerConnection.updateIceConnectionState(static_cast<RTCIceConnectionState>(derivedState));
> 
> This looks bad, deriveAggregatedIceConnectionState should really be changed
> to return RTCIceConnectionState.

I have a patch for this, but should MediaEndpointPeerConnection be part of the xcodeproj at all?
Comment 2 Jon Lee 2017-03-19 21:30:44 PDT
Created attachment 304913 [details]
Patch
Comment 3 youenn fablet 2017-03-20 08:24:59 PDT
Comment on attachment 304913 [details]
Patch

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

> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:879
> +    Vector<RTCIceTransportState> transportStates(m_peerConnection.getTransceivers().size());

Please use reserveInitialCapacity to preallocate without creating the objects.
Comment 4 Jon Lee 2017-03-20 14:59:46 PDT
Comment on attachment 304913 [details]
Patch

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

>> Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp:879
>> +    Vector<RTCIceTransportState> transportStates(m_peerConnection.getTransceivers().size());
> 
> Please use reserveInitialCapacity to preallocate without creating the objects.

Done.
Comment 5 Jon Lee 2017-03-20 15:01:50 PDT
Created attachment 304954 [details]
Patch for landing
Comment 6 Jon Lee 2017-03-20 19:10:11 PDT
Created attachment 304981 [details]
Patch for landing
Comment 7 WebKit Commit Bot 2017-03-20 19:51:03 PDT
Comment on attachment 304981 [details]
Patch for landing

Clearing flags on attachment: 304981

Committed r214207: <http://trac.webkit.org/changeset/214207>