Overview: Calls to createOffer (and possibly createAnswer, too) on instances of RTCPeerConnection return a Promise<RTCSessionDescription> instead of the Promise<RTCSessionDescriptionInit> (note the -Init) as per spec (https://w3c.github.io/webrtc-pc/archives/20160513/webrtc.html#interface-definition). Steps to Reproduce: 1. Open codepen https://codepen.io/anon/pen/jwWPMq?editors=1011 in Safari TP 33 2. Notice how the function fails to log the second line because offer.sdp cannot be set on RTCSessionDescriptions Actual Result: RTCPeerConnection#createOffer returns a Promise that resolves to a RTCSessionDescription object with readonly properties. Expected Result: RTCSessionDescriptions returned from createOffer (and possibly createAnswer, untested) should be RTCSessionDescriptionInits instead so that the properties can be modified. This breaks not only our internal code that I cannot disclose here (hence the codepen), but also sites like https://webrtc.github.io/samples/src/content/peerconnection/munge-sdp/. Build Date & Hardware: Safari TP 33 on macOS 10.12.5
<rdar://problem/32746761>
Created attachment 312823 [details] Patch
Comment on attachment 312823 [details] Patch Attachment 312823 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/3926085 New failing tests: imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createOffer.html
Created attachment 312835 [details] Archive of layout-test-results from ews122 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-wk2 Platform: Mac OS X 10.12.5
Comment on attachment 312823 [details] Patch Attachment 312823 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/3926562 New failing tests: fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createOffer.html
Created attachment 312845 [details] Archive of layout-test-results from ews105 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews105 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Created attachment 312874 [details] Patch for landing
Thanks for the review. > New failing tests: > fast/mediastream/RTCPeerConnection-setRemoteDescription-offer.html > fast/mediastream/RTCPeerConnection-setLocalDescription-offer.html The changes there show that we are no longer returning RTCSessionDescription. That said, we are still failing some assertions in these. Should be investigated further > imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-createOffer.html Going from FAIL to PASS :)
Comment on attachment 312874 [details] Patch for landing Clearing flags on attachment: 312874 Committed r218335: <http://trac.webkit.org/changeset/218335>
All reviewed patches have been landed. Closing bug.