Changeset 202810 in webkit
- Timestamp:
- Jul 4, 2016 11:31:37 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r202805 r202810 1 2016-07-04 Youenn Fablet <youenn@apple.com> 2 3 Shield WebRTC JS built-ins from user scripts 4 https://bugs.webkit.org/show_bug.cgi?id=155964 5 6 Reviewed by Sam Weinig. 7 8 * fast/mediastream/RTCPeerConnection-createOffer.html: 9 * fast/mediastream/RTCPeerConnection-stable.html: 10 1 11 2016-07-04 Yusuke Suzuki <utatane.tea@gmail.com> 2 12 -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-createOffer.html
r165226 r202810 7 7 <script> 8 8 description("Tests RTCPeerConnection createOffer."); 9 10 // Let's ensure built-ins are shielded from user scripts 11 var thenPromise = Promise.prototype.then; 12 Promise.prototype.then = function() { 13 console.log("Promise.prototype.then is called internally"); 14 return thenPromise.apply(this, arguments); 15 } 9 16 10 17 var pc = null; -
trunk/LayoutTests/fast/mediastream/RTCPeerConnection-stable.html
r164602 r202810 9 9 10 10 var pc = null; 11 12 // Let's ensure built-ins are shielded from user scripts 13 var thenPromise = Promise.prototype.then; 14 Promise.prototype.then = function() { 15 console.log("Promise.prototype.then is called internally"); 16 return thenPromise.apply(this, arguments); 17 } 11 18 12 19 function requestSucceeded2() -
trunk/Source/WebCore/ChangeLog
r202809 r202810 1 2016-07-04 Youenn Fablet <youenn@apple.com> 2 3 Shield WebRTC JS built-ins from user scripts 4 https://bugs.webkit.org/show_bug.cgi?id=155964 5 6 Reviewed by Sam Weinig. 7 8 Making use of Promise.prototype.@then instead of Promise.prototype.then. 9 Covered by updated tests. 10 11 * Modules/mediastream/RTCPeerConnection.js: 12 (createOffer): 13 (createAnswer): 14 (setLocalDescription): 15 (setRemoteDescription): 16 (addIceCandidate): 17 (getStats): 18 * Modules/mediastream/RTCPeerConnectionInternals.js: 19 (enqueueOperation): 20 1 21 2016-07-04 Brady Eidson <beidson@apple.com> 2 22 -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.js
r202565 r202810 147 147 // Legacy callbacks mode 148 148 @enqueueOperation(peerConnection, function () { 149 return peerConnection.@queuedCreateOffer(options). then(successCallback, errorCallback);149 return peerConnection.@queuedCreateOffer(options).@then(successCallback, errorCallback); 150 150 }); 151 151 … … 171 171 // Legacy callbacks mode 172 172 @enqueueOperation(peerConnection, function () { 173 return peerConnection.@queuedCreateAnswer(options). then(successCallback, errorCallback);173 return peerConnection.@queuedCreateAnswer(options).@then(successCallback, errorCallback); 174 174 }); 175 175 … … 200 200 // Legacy callbacks mode 201 201 @enqueueOperation(peerConnection, function () { 202 return peerConnection.@queuedSetLocalDescription(description). then(successCallback, errorCallback);202 return peerConnection.@queuedSetLocalDescription(description).@then(successCallback, errorCallback); 203 203 }); 204 204 … … 229 229 // Legacy callbacks mode 230 230 @enqueueOperation(peerConnection, function () { 231 return peerConnection.@queuedSetRemoteDescription(description). then(successCallback, errorCallback);231 return peerConnection.@queuedSetRemoteDescription(description).@then(successCallback, errorCallback); 232 232 }); 233 233 … … 258 258 // Legacy callbacks mode 259 259 @enqueueOperation(peerConnection, function () { 260 return peerConnection.@queuedAddIceCandidate(candidate). then(successCallback, errorCallback);260 return peerConnection.@queuedAddIceCandidate(candidate).@then(successCallback, errorCallback); 261 261 }); 262 262 … … 285 285 }, function (selector, successCallback, errorCallback) { 286 286 // Legacy callbacks mode 287 peerConnection.@privateGetStats(selector). then(successCallback, errorCallback);288 289 return @Promise.@resolve(@undefined); 290 }); 291 } 287 peerConnection.@privateGetStats(selector).@then(successCallback, errorCallback); 288 289 return @Promise.@resolve(@undefined); 290 }); 291 } -
trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js
r202565 r202810 47 47 return new @Promise(function (resolve, reject) { 48 48 operations.@push(function() { 49 operation(). then(resolve, reject).then(runNext, runNext);49 operation().@then(resolve, reject).@then(runNext, runNext); 50 50 }); 51 51
Note: See TracChangeset
for help on using the changeset viewer.