Changeset 200144 in webkit


Ignore:
Timestamp:
Apr 27, 2016 12:40:52 PM (8 years ago)
Author:
adam.bergkvist@ericsson.com
Message:

WebRTC: RTCIceCandidate don't need a custom bindings
https://bugs.webkit.org/show_bug.cgi?id=157074

Reviewed by Eric Carlson.

Source/WebCore:

Removed custom constructor and replaced custom attribute getters with
nullable types. Removed custom binding from builds.

Testing: Updated existing test.

  • CMakeLists.txt:
  • Modules/mediastream/RTCIceCandidate.idl:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/JSRTCIceCandidateCustom.cpp: Removed.

(WebCore::constructJSRTCIceCandidate): Deleted.
(WebCore::JSRTCIceCandidate::sdpMid): Deleted.
(WebCore::JSRTCIceCandidate::sdpMLineIndex): Deleted.

LayoutTests:

  • fast/mediastream/RTCIceCandidate-expected.txt:

Updated with error messages from generated constructor binding.

Location:
trunk
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r200137 r200144  
     12016-04-27  Adam Bergkvist  <adam.bergkvist@ericsson.com>
     2
     3        WebRTC: RTCIceCandidate don't need a custom bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=157074
     5
     6        Reviewed by Eric Carlson.
     7
     8        * fast/mediastream/RTCIceCandidate-expected.txt:
     9        Updated with error messages from generated constructor binding.
     10
    1112016-04-27  Eric Carlson  <eric.carlson@apple.com>
    212
  • trunk/LayoutTests/fast/mediastream/RTCIceCandidate-expected.txt

    r198325 r200144  
    1010
    1111Dictionary member 'candidate' is required.
    12 PASS new RTCIceCandidate({}); threw exception TypeError: Error creating RTCIceCandidate.
    13 PASS new RTCIceCandidate({sdpMid:"bar", sdpMLineIndex:6}); threw exception TypeError: Error creating RTCIceCandidate.
    14 PASS new RTCIceCandidate({sdpMid:"bar"}); threw exception TypeError: Error creating RTCIceCandidate.
    15 PASS new RTCIceCandidate({sdpMLineIndex:6}); threw exception TypeError: Error creating RTCIceCandidate.
     12PASS new RTCIceCandidate({}); threw exception TypeError: Type error.
     13PASS new RTCIceCandidate({sdpMid:"bar", sdpMLineIndex:6}); threw exception TypeError: Type error.
     14PASS new RTCIceCandidate({sdpMid:"bar"}); threw exception TypeError: Type error.
     15PASS new RTCIceCandidate({sdpMLineIndex:6}); threw exception TypeError: Type error.
    1616
    1717One of the 'sdpMid' or 'sdpMLineIndex' members must be present.
    18 PASS new RTCIceCandidate({candidate:"foo"}); threw exception TypeError: Error creating RTCIceCandidate.
     18PASS new RTCIceCandidate({candidate:"foo"}); threw exception TypeError: Type error.
    1919
    2020When one of the 'sdpMid' or 'sdpMLineIndex' members is set, the other must be null.
     
    2727
    2828Some bad input
    29 PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:"a"}); threw exception TypeError: Error creating RTCIceCandidate.
    30 PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:-1}); threw exception TypeError: Error creating RTCIceCandidate.
    31 PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:65536}); threw exception TypeError: Error creating RTCIceCandidate.
    32 PASS new RTCIceCandidate(5); threw exception TypeError: Optional RTCIceCandidate constructor argument must be a valid Dictionary.
    33 PASS new RTCIceCandidate("foobar"); threw exception TypeError: Optional RTCIceCandidate constructor argument must be a valid Dictionary.
     29PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:"a"}); threw exception TypeError: Type error.
     30PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:-1}); threw exception TypeError: Type error.
     31PASS new RTCIceCandidate({candidate:"foo", sdpMLineIndex:65536}); threw exception TypeError: Type error.
     32PASS new RTCIceCandidate(5); threw exception TypeError: Type error.
     33PASS new RTCIceCandidate("foobar"); threw exception TypeError: Type error.
    3434PASS new RTCIceCandidate(candidate:""); threw exception SyntaxError: Unexpected token ':'. Expected ')' to end a argument list..
    3535PASS successfullyParsed is true
  • trunk/Source/WebCore/CMakeLists.txt

    r200129 r200144  
    11981198    bindings/js/JSReadableStreamPrivateConstructors.cpp
    11991199    bindings/js/JSReadableStreamSourceCustom.cpp
    1200     bindings/js/JSRTCIceCandidateCustom.cpp
    12011200    bindings/js/JSRTCPeerConnectionCustom.cpp
    12021201    bindings/js/JSRTCSessionDescriptionCustom.cpp
  • trunk/Source/WebCore/ChangeLog

    r200141 r200144  
     12016-04-27  Adam Bergkvist  <adam.bergkvist@ericsson.com>
     2
     3        WebRTC: RTCIceCandidate don't need a custom bindings
     4        https://bugs.webkit.org/show_bug.cgi?id=157074
     5
     6        Reviewed by Eric Carlson.
     7
     8        Removed custom constructor and replaced custom attribute getters with
     9        nullable types. Removed custom binding from builds.
     10
     11        Testing: Updated existing test.
     12
     13        * CMakeLists.txt:
     14        * Modules/mediastream/RTCIceCandidate.idl:
     15        * WebCore.xcodeproj/project.pbxproj:
     16        * bindings/js/JSRTCIceCandidateCustom.cpp: Removed.
     17        (WebCore::constructJSRTCIceCandidate): Deleted.
     18        (WebCore::JSRTCIceCandidate::sdpMid): Deleted.
     19        (WebCore::JSRTCIceCandidate::sdpMLineIndex): Deleted.
     20
    1212016-04-27  Chris Dumez  <cdumez@apple.com>
    222
  • trunk/Source/WebCore/Modules/mediastream/RTCIceCandidate.idl

    r198492 r200144  
    3232[
    3333    Conditional=WEB_RTC,
    34     CustomConstructor(optional Dictionary dictionary),
     34    Constructor(optional Dictionary dictionary),
    3535    ConstructorRaisesException
    3636] interface RTCIceCandidate {
    3737    attribute DOMString candidate;
    38     [CustomGetter] attribute DOMString sdpMid;
    39     [CustomGetter] attribute unsigned short sdpMLineIndex;
     38    attribute DOMString? sdpMid;
     39    attribute unsigned short? sdpMLineIndex;
    4040};
    4141
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r200116 r200144  
    19071907                4AD0173C127E82860015035F /* JSHTMLOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */; };
    19081908                4AD0173D127E82860015035F /* JSHTMLOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AD0173B127E82860015035F /* JSHTMLOutputElement.h */; };
    1909                 4AE0BF891836084400F3852D /* JSRTCIceCandidateCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4AE0BF881836083100F3852D /* JSRTCIceCandidateCustom.cpp */; };
    19101909                4B2708C70AF19EE40065127F /* Pasteboard.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B2708C50AF19EE40065127F /* Pasteboard.h */; settings = {ATTRIBUTES = (Private, ); }; };
    19111910                4B2709830AF2E5E00065127F /* PasteboardMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B2709810AF2E5E00065127F /* PasteboardMac.mm */; };
     
    94579456                4AD0173A127E82860015035F /* JSHTMLOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLOutputElement.cpp; sourceTree = "<group>"; };
    94589457                4AD0173B127E82860015035F /* JSHTMLOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLOutputElement.h; sourceTree = "<group>"; };
    9459                 4AE0BF881836083100F3852D /* JSRTCIceCandidateCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSRTCIceCandidateCustom.cpp; sourceTree = "<group>"; };
    94609458                4B2708C50AF19EE40065127F /* Pasteboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pasteboard.h; sourceTree = "<group>"; };
    94619459                4B2709810AF2E5E00065127F /* PasteboardMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PasteboardMac.mm; sourceTree = "<group>"; };
     
    2250022498                                FD8AA63D169514A700D2EA68 /* JSPannerNodeCustom.cpp */,
    2250122499                                A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
    22502                                 4AE0BF881836083100F3852D /* JSRTCIceCandidateCustom.cpp */,
    2250322500                                07CA120D182D67D800D12197 /* JSRTCPeerConnectionCustom.cpp */,
    2250422501                                07D07B131834158800ABDD3C /* JSRTCSessionDescriptionCustom.cpp */,
     
    3054730544                                07969DB117D14151007FF842 /* JSRTCDTMFToneChangeEvent.cpp in Sources */,
    3054830545                                07969DB517D14151007FF842 /* JSRTCIceCandidate.cpp in Sources */,
    30549                                 4AE0BF891836084400F3852D /* JSRTCIceCandidateCustom.cpp in Sources */,
    3055030546                                07969DB717D14151007FF842 /* JSRTCIceCandidateEvent.cpp in Sources */,
    3055130547                                073794EB19EE341E00E5A045 /* JSRTCIceServer.cpp in Sources */,
Note: See TracChangeset for help on using the changeset viewer.