Skip to content
  • commit-queue@webkit.org's avatar
    Checking for TypeError in RTCPeerConnection object creation · 9d56fba8
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=124049
    
    Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-11-08
    Reviewed by Eric Carlson.
    
    Source/WebCore:
    
    If invalid parameters are passed on RTCPeerConnection creation we must throw a TypeError exception.
    According to the spec it requires a Dictionary argument, the RTCConfiguration, which is mandatory.
    
    Please notice that this patch does not make every tests run as expected,
    RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
    
    Existing tests were updated.
    
    * GNUmakefile.list.am:
    * Modules/mediastream/RTCPeerConnection.idl:
    * UseJSC.cmake:
    * WebCore.vcxproj/WebCore.vcxproj:
    * WebCore.vcxproj/WebCore.vcxproj.filters:
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/js/JSRTCPeerConnectionCustom.cpp: Added.
    (WebCore::JSRTCPeerConnectionConstructor::constructJSRTCPeerConnection):
    
    LayoutTests:
    
    Please notice that this patch does not make every tests run as expected,
    RTCPeerConnectionHandlerMock needs to be update to deal with contraints.
    
    * fast/mediastream/RTCPeerConnection-AddRemoveStream.html:
    * fast/mediastream/RTCPeerConnection-createAnswer.html:
    * fast/mediastream/RTCPeerConnection-createOffer.html:
    * fast/mediastream/RTCPeerConnection-datachannel.html:
    * fast/mediastream/RTCPeerConnection-dtmf.html:
    * fast/mediastream/RTCPeerConnection-events.html:
    * fast/mediastream/RTCPeerConnection-expected.txt:
    * fast/mediastream/RTCPeerConnection-ice-expected.txt:
    * fast/mediastream/RTCPeerConnection-ice.html:
    * fast/mediastream/RTCPeerConnection-localDescription.html:
    * fast/mediastream/RTCPeerConnection-onnegotiationneeded.html:
    * fast/mediastream/RTCPeerConnection-remoteDescription.html:
    * fast/mediastream/RTCPeerConnection-stats-expected.txt:
    * fast/mediastream/RTCPeerConnection-stats.html:
    * fast/mediastream/RTCPeerConnection-statsSelector-expected.txt:
    * fast/mediastream/RTCPeerConnection-statsSelector.html:
    * fast/mediastream/RTCPeerConnection.html:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158964 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    9d56fba8