RESOLVED FIXED 177812
rtc::PacketOptions should have its own IPC encoding/decoding routines
https://bugs.webkit.org/show_bug.cgi?id=177812
Summary rtc::PacketOptions should have its own IPC encoding/decoding routines
youenn fablet
Reported 2017-10-03 06:44:47 PDT
rtc::PacketOptions should have its own IPC encoding/decoding routines
Attachments
Patch (20.32 KB, patch)
2017-10-03 07:08 PDT, youenn fablet
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (3.27 MB, application/zip)
2017-10-03 14:26 PDT, Build Bot
no flags
Patch (20.26 KB, patch)
2017-10-04 02:37 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2017-10-03 07:08:02 PDT
Build Bot
Comment 2 2017-10-03 14:26:23 PDT
Comment on attachment 322515 [details] Patch Attachment 322515 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/4744831 New failing tests: workers/wasm-hashset.html
Build Bot
Comment 3 2017-10-03 14:26:25 PDT
Created attachment 322582 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
youenn fablet
Comment 4 2017-10-03 15:10:01 PDT
Comment on attachment 322515 [details] Patch Error is unrelated
Alex Christensen
Comment 5 2017-10-03 19:57:09 PDT
Comment on attachment 322515 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322515&action=review > Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.messages.in:26 > +void SendTo(IPC::DataReference data, WebKit::RTCNetwork::SocketAddress address, struct WebKit::RTCPacketOptions options) keep the indentation. > Source/WebKit/Shared/RTCPacketOptions.cpp:58 > + if (!decoder.decodeEnum(dscp)) We should add an enum traits for this somewhere so we don't have to use decodeEnum. > Source/WebKit/Shared/RTCPacketOptions.cpp:74 > + if (!decoder.decode(srtpAuthKey)) This looks like it might be wrong. The encoder encodes a DataReference, and this is decoding a std::optional<DataReference>. That doesn't match. > Source/WebKit/Shared/RTCPacketOptions.h:2 > + * Copyright (C) 2016 Apple Inc. All rights reserved. 2017
youenn fablet
Comment 6 2017-10-04 02:18:06 PDT
Thanks for the review. (In reply to Alex Christensen from comment #5) > Comment on attachment 322515 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=322515&action=review > > > Source/WebKit/NetworkProcess/webrtc/NetworkRTCSocket.messages.in:26 > > +void SendTo(IPC::DataReference data, WebKit::RTCNetwork::SocketAddress address, struct WebKit::RTCPacketOptions options) > > keep the indentation. OK > > Source/WebKit/Shared/RTCPacketOptions.cpp:58 > > + if (!decoder.decodeEnum(dscp)) > > We should add an enum traits for this somewhere so we don't have to use > decodeEnum. I am not sure. The enumeration is not in WebCore code, it might be easy to miss a change in the enumeration and not update the type trait. Since it is not an enum class, I am also not sure there is a way to catch this issue through compilation error. > > Source/WebKit/Shared/RTCPacketOptions.cpp:74 > > + if (!decoder.decode(srtpAuthKey)) > > This looks like it might be wrong. The encoder encodes a DataReference, and > this is decoding a std::optional<DataReference>. That doesn't match. Ah, right! Seems like an easy trap when mixing the legacy/new decoders.
youenn fablet
Comment 7 2017-10-04 02:37:30 PDT
WebKit Commit Bot
Comment 8 2017-10-04 20:54:42 PDT
Comment on attachment 322644 [details] Patch Clearing flags on attachment: 322644 Committed r222894: <http://trac.webkit.org/changeset/222894>
WebKit Commit Bot
Comment 9 2017-10-04 20:54:44 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 10 2017-10-04 20:55:39 PDT
Note You need to log in before you can comment on or make changes to this bug.