⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278842 in webkit


Ignore:
Timestamp:
Jun 14, 2021, 11:40:54 AM (5 years ago)
Author:
youenn@apple.com
Message:

Fix RTCDataChannelInit::decode
​https://bugs.webkit.org/show_bug.cgi?id=226968

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https-expected.txt: Added.
  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html: Added.
  • web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.js: Added.

(onmessage):

Source/WebCore:

Test: imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html

  • platform/mediastream/RTCDataChannelHandler.h:

(WebCore::RTCDataChannelInit::decode):
Make sure to use optionals of optionals.

LayoutTests:

  • platform/mac-wk1/TestExpectations:
Location:
trunk
Files:
3 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r278829 r278842  
     12021-06-14  Youenn Fablet  <youenn@apple.com>
     2
     3        Fix RTCDataChannelInit::decode
     4        https://bugs.webkit.org/show_bug.cgi?id=226968
     5
     6        Reviewed by Eric Carlson.
     7
     8        * platform/mac-wk1/TestExpectations:
     9
    1102021-06-14  Robert Jenner  <jenner@apple.com>
    211
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r278840 r278842  
     12021-06-14  Youenn Fablet  <youenn@apple.com>
     2
     3        Fix RTCDataChannelInit::decode
     4        https://bugs.webkit.org/show_bug.cgi?id=226968
     5
     6        Reviewed by Eric Carlson.
     7
     8        * web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https-expected.txt: Added.
     9        * web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html: Added.
     10        * web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.js: Added.
     11        (onmessage):
     12
    1132021-06-14  Youenn Fablet  <youenn@apple.com>
    214
  • trunk/LayoutTests/platform/mac-wk1/TestExpectations

    r278777 r278842  
    377377imported/w3c/web-platform-tests/worklets/layout-worklet-service-worker-interception.https.html [ Skip ]
    378378imported/w3c/web-platform-tests/worklets/paint-worklet-service-worker-interception.https.html [ Skip ]
     379imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html [ Skip ]
    379380
    380381# Quota check missing in WK1
  • trunk/Source/WebCore/ChangeLog

    r278838 r278842  
     12021-06-14  Youenn Fablet  <youenn@apple.com>
     2
     3        Fix RTCDataChannelInit::decode
     4        https://bugs.webkit.org/show_bug.cgi?id=226968
     5
     6        Reviewed by Eric Carlson.
     7
     8        Test: imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html
     9
     10        * platform/mediastream/RTCDataChannelHandler.h:
     11        (WebCore::RTCDataChannelInit::decode):
     12        Make sure to use optionals of optionals.
     13
    1142021-06-14  Per Arne  <pvollan@apple.com>
    215
  • trunk/Source/WebCore/platform/mediastream/RTCDataChannelHandler.h

    r278516 r278842  
    6363template<class Decoder> std::optional<RTCDataChannelInit> RTCDataChannelInit::decode(Decoder& decoder)
    6464{
    65     std::optional<bool> ordered;
     65    std::optional<std::optional<bool>> ordered;
    6666    decoder >> ordered;
    6767    if (!ordered)
    6868        return { };
    6969
    70     std::optional<unsigned short> maxPacketLifeTime;
     70    std::optional<std::optional<unsigned short>> maxPacketLifeTime;
    7171    decoder >> maxPacketLifeTime;
    7272    if (!maxPacketLifeTime)
    7373        return { };
    7474
    75     std::optional<unsigned short> maxRetransmits;
     75    std::optional<std::optional<unsigned short>> maxRetransmits;
    7676    decoder >> maxRetransmits;
    7777    if (!maxRetransmits)
    … …  
    8282        return { };
    8383
    84     std::optional<bool> negotiated;
     84    std::optional<std::optional<bool>> negotiated;
    8585    decoder >> negotiated;
    8686    if (!negotiated)
    8787        return { };
    8888
    89     std::optional<unsigned short> id;
     89    std::optional<std::optional<unsigned short>> id;
    9090    decoder >> id;
    9191    if (!id)
Note: See TracChangeset for help on using the changeset viewer.