Changeset 202130 in webkit
- Timestamp:
- Jun 16, 2016 11:12:41 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202128 r202130 1 2016-06-16 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: Check type of this in RTCPeerConnection JS built-in functions 4 https://bugs.webkit.org/show_bug.cgi?id=151303 5 6 Reviewed by Youenn Fablet. 7 8 Verify that the RTCPeerConnection JS built-in methods checks 'this'. The test has expected 9 failures (bug: http://webkit.org/b/158831). 10 11 * fast/mediastream/RTCPeerConnection-js-built-ins-check-this-expected.txt: Added. 12 * fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html: Added. 13 * platform/mac/TestExpectations: 14 The mac port does not build with WEB_RTC enabled yet. 15 1 16 2016-06-16 Dean Jackson <dino@apple.com> 2 17 -
trunk/LayoutTests/platform/mac/TestExpectations
r202117 r202130 186 186 fast/mediastream/RTCPeerConnection-stable.html 187 187 fast/mediastream/RTCPeerConnection.html 188 fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html 188 189 fast/mediastream/RTCPeerConnection-inspect-offer.html 189 190 fast/mediastream/RTCPeerConnection-add-removeTrack.html -
trunk/Source/WebCore/ChangeLog
r202127 r202130 1 2016-06-16 Adam Bergkvist <adam.bergkvist@ericsson.com> 2 3 WebRTC: Check type of this in RTCPeerConnection JS built-in functions 4 https://bugs.webkit.org/show_bug.cgi?id=151303 5 6 Reviewed by Youenn Fablet. 7 8 Check type of 'this' in RTCPeerConnection JS built-in functions. 9 10 Test: fast/mediastream/RTCPeerConnection-js-built-ins-check-this.html 11 12 * Modules/mediastream/RTCPeerConnection.js: 13 (createOffer): 14 (createAnswer): 15 (setLocalDescription): 16 (setRemoteDescription): 17 (addIceCandidate): 18 (getStats): 19 Reject if 'this' isn't of type RTCPeerConnection. 20 * Modules/mediastream/RTCPeerConnectionInternals.js: 21 (isRTCPeerConnection): 22 Add helper function to perform type check. Needs further robustifying. 23 1 24 2016-06-16 Myles C. Maxfield <mmaxfield@apple.com> 2 25 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js
r201455 r202130 35 35 "use strict"; 36 36 37 if (!@isRTCPeerConnection(this)) 38 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 39 37 40 const peerConnection = this; 38 41 … … 56 59 "use strict"; 57 60 61 if (!@isRTCPeerConnection(this)) 62 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 63 58 64 const peerConnection = this; 59 65 … … 76 82 { 77 83 "use strict"; 84 85 if (!@isRTCPeerConnection(this)) 86 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 78 87 79 88 const peerConnection = this; … … 103 112 "use strict"; 104 113 114 if (!@isRTCPeerConnection(this)) 115 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 116 105 117 const peerConnection = this; 106 118 … … 128 140 { 129 141 "use strict"; 142 143 if (!@isRTCPeerConnection(this)) 144 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 130 145 131 146 const peerConnection = this; … … 155 170 "use strict"; 156 171 172 if (!@isRTCPeerConnection(this)) 173 return @Promise.@reject(new @TypeError("Function should be called on an RTCPeerConnection")); 174 157 175 const peerConnection = this; 158 176 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js
r201455 r202130 129 129 return legacyMode(successCallback, errorCallback, args[2]); 130 130 } 131 132 function isRTCPeerConnection(connection) 133 { 134 "use strict"; 135 136 // FIXME: Robustify this check (http://webkit.org/b/158831) 137 return @isObject(connection) && !!connection.@queuedCreateOffer; 138 }
Note: See TracChangeset
for help on using the changeset viewer.