Title: [214490] trunk
- Revision
- 214490
- Author
- commit-qu...@webkit.org
- Date
- 2017-03-28 13:40:18 -0700 (Tue, 28 Mar 2017)
Log Message
Fix addIceCandidate after r214441
https://bugs.webkit.org/show_bug.cgi?id=170146
Patch by Youenn Fablet <you...@apple.com> on 2017-03-28
Reviewed by Chris Dumez.
LayoutTests/imported/w3c:
* web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
Source/WebCore:
Covered by rebased test.
* Modules/mediastream/RTCPeerConnection.js:
(addIceCandidate): Setting function length to 1 and throwing if no parameter is passed.
Modified Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (214489 => 214490)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2017-03-28 20:08:49 UTC (rev 214489)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2017-03-28 20:40:18 UTC (rev 214490)
@@ -1,3 +1,12 @@
+2017-03-28 Youenn Fablet <you...@apple.com>
+
+ Fix addIceCandidate after r214441
+ https://bugs.webkit.org/show_bug.cgi?id=170146
+
+ Reviewed by Chris Dumez.
+
+ * web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt:
+
2017-03-27 Youenn Fablet <you...@apple.com>
addIceCandidate should not throw if passed null or undefined
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt (214489 => 214490)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2017-03-28 20:08:49 UTC (rev 214489)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-idl-expected.txt 2017-03-28 20:40:18 UTC (rev 214490)
@@ -23,7 +23,7 @@
PASS RTCPeerConnection interface: attribute remoteDescription
PASS RTCPeerConnection interface: attribute currentRemoteDescription
PASS RTCPeerConnection interface: attribute pendingRemoteDescription
-FAIL RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object]) assert_equals: property has wrong .length expected 1 but got 0
+PASS RTCPeerConnection interface: operation addIceCandidate([object Object],[object Object])
PASS RTCPeerConnection interface: attribute signalingState
PASS RTCPeerConnection interface: attribute iceGatheringState
PASS RTCPeerConnection interface: attribute iceConnectionState
@@ -44,7 +44,9 @@
fn.apply(obj, args);
}" did not throw
FAIL RTCPeerConnection interface: operation setRemoteDescription(RTCSessionDescription,VoidFunction,RTCPeerConnectionErrorCallback) assert_equals: property has wrong .length expected 1 but got 0
-FAIL RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidate,VoidFunction,RTCPeerConnectionErrorCallback) assert_equals: property has wrong .length expected 1 but got 0
+FAIL RTCPeerConnection interface: operation addIceCandidate(RTCIceCandidate,VoidFunction,RTCPeerConnectionErrorCallback) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
+ fn.apply(obj, args);
+ }" did not throw
FAIL RTCPeerConnection interface: operation getStats(MediaStreamTrack,RTCStatsCallback,RTCPeerConnectionErrorCallback) assert_throws: calling operation with this = null didn't throw TypeError function "function () {
fn.apply(obj, args);
}" did not throw
@@ -79,7 +81,7 @@
PASS RTCPeerConnection interface: pc must inherit property "currentRemoteDescription" with the proper type (8)
PASS RTCPeerConnection interface: pc must inherit property "pendingRemoteDescription" with the proper type (9)
PASS RTCPeerConnection interface: pc must inherit property "addIceCandidate" with the proper type (10)
-FAIL RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object]) on pc with too few arguments must throw TypeError assert_unreached: Should have rejected: undefined Reached unreachable code
+PASS RTCPeerConnection interface: calling addIceCandidate([object Object],[object Object]) on pc with too few arguments must throw TypeError
FAIL RTCPeerConnection interface: pc must inherit property "signalingState" with the proper type (11) Unrecognized type RTCSignalingState
FAIL RTCPeerConnection interface: pc must inherit property "iceGatheringState" with the proper type (12) Unrecognized type RTCIceGatheringState
FAIL RTCPeerConnection interface: pc must inherit property "iceConnectionState" with the proper type (13) Unrecognized type RTCIceConnectionState
Modified: trunk/Source/WebCore/ChangeLog (214489 => 214490)
--- trunk/Source/WebCore/ChangeLog 2017-03-28 20:08:49 UTC (rev 214489)
+++ trunk/Source/WebCore/ChangeLog 2017-03-28 20:40:18 UTC (rev 214490)
@@ -1,5 +1,17 @@
2017-03-28 Youenn Fablet <you...@apple.com>
+ Fix addIceCandidate after r214441
+ https://bugs.webkit.org/show_bug.cgi?id=170146
+
+ Reviewed by Chris Dumez.
+
+ Covered by rebased test.
+
+ * Modules/mediastream/RTCPeerConnection.js:
+ (addIceCandidate): Setting function length to 1 and throwing if no parameter is passed.
+
+2017-03-28 Youenn Fablet <you...@apple.com>
+
Stop RTCDataChannel when closing page
https://bugs.webkit.org/show_bug.cgi?id=170166
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js (214489 => 214490)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js 2017-03-28 20:08:49 UTC (rev 214489)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js 2017-03-28 20:40:18 UTC (rev 214490)
@@ -237,7 +237,7 @@
});
}
-function addIceCandidate()
+function addIceCandidate(candidate)
{
"use strict";
@@ -244,6 +244,9 @@
if (!@isRTCPeerConnection(this))
return @Promise.@reject(@makeThisTypeError("RTCPeerConnection", "addIceCandidate"));
+ if (arguments.length < 1)
+ return @Promise.@reject(new @TypeError("Not enough arguments"));
+
const peerConnection = this;
const objectInfo = {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes