Diff
Modified: trunk/LayoutTests/ChangeLog (164371 => 164372)
--- trunk/LayoutTests/ChangeLog 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/LayoutTests/ChangeLog 2014-02-19 18:48:35 UTC (rev 164372)
@@ -1,3 +1,15 @@
+2014-02-19 Thiago de Barros Lacerda <[email protected]>
+
+ [WebRTC] Updating RTCConfiguration to match WebRTC editor's draft of 01/27/2014
+ https://bugs.webkit.org/show_bug.cgi?id=129000
+
+ Adding RTCIceTransports and RTCIdentityOption to RTCConfiguration object.
+
+ Reviewed by Eric Carlson.
+
+ * fast/mediastream/RTCPeerConnection-expected.txt:
+ * fast/mediastream/RTCPeerConnection.html:
+
2014-02-19 Mark Hahnenberg <[email protected]>
Dedicated worker crash caused by global DFG worklists + GC
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt (164371 => 164372)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt 2014-02-19 18:48:35 UTC (rev 164372)
@@ -25,6 +25,24 @@
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, null); threw exception TypeError: Optional constraints argument of RTCPeerConnection must be a valid Dictionary.
PASS new webkitRTCPeerConnection({iceServers:[]}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'yes'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'no'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], requestIdentity:'ifconfigured'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'bar'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'bar'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'no'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'yes'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'no'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'ifconfigured'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'yes'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'no'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'ifconfigured'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'yes'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'no'}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'ifconfigured'}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[]}, {}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, {}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, {}); did not throw exception.
@@ -32,6 +50,11 @@
PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com', username:'user'}]}, {}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}]}, {}); did not throw exception.
PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, {}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception.
+PASS new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {}); did not throw exception.
PASS new webkitRTCPeerConnection({fooServers:[]}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments.
PASS new webkitRTCPeerConnection({iceServers:true}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments.
PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, {}); threw exception TypeError: Invalid RTCPeerConnection constructor arguments.
Modified: trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html (164371 => 164372)
--- trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/LayoutTests/fast/mediastream/RTCPeerConnection.html 2014-02-19 18:48:35 UTC (rev 164372)
@@ -30,6 +30,26 @@
shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, null);")
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]});");
+
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'yes'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'no'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], requestIdentity:'ifconfigured'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'bar'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'bar'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'foo', requestIdentity:'no'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'yes'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'no'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'none', requestIdentity:'ifconfigured'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'yes'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'no'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'relay', requestIdentity:'ifconfigured'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'yes'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'no'});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[], iceTransports:'all', requestIdentity:'ifconfigured'});");
+
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, {});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com'}]}, {});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}]}, {});");
@@ -38,6 +58,12 @@
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}]}, {});");
shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}]}, {});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', credential:'x'},{url:'stun:bar.com'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'stun:foo.com', username:'user'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});");
+ shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{url:'turn:foo.com', username:'user', credential:'x'},{url:'stun:bar.com', username:'user2', credential:'x'}], iceTransports:'all', requestIdentity:'ifconfigured'}, {});");
+
shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, {});");
shouldThrow("new webkitRTCPeerConnection({iceServers:true}, {});");
shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, {});");
Modified: trunk/Source/WebCore/ChangeLog (164371 => 164372)
--- trunk/Source/WebCore/ChangeLog 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/Source/WebCore/ChangeLog 2014-02-19 18:48:35 UTC (rev 164372)
@@ -1,3 +1,25 @@
+2014-02-19 Thiago de Barros Lacerda <[email protected]>
+
+ [WebRTC] Updating RTCConfiguration to match WebRTC editor's draft of 01/27/2014
+ https://bugs.webkit.org/show_bug.cgi?id=129000
+
+ Reviewed by Eric Carlson.
+
+ Adding RTCIceTransports and RTCIdentityOption to RTCConfiguration object.
+
+ Existing test was updated.
+
+ * Modules/mediastream/RTCPeerConnection.cpp:
+ (WebCore::RTCPeerConnection::parseConfiguration): Taking into account iceTransports and requestIdentity
+ parameters.
+ * platform/mediastream/RTCConfiguration.h:
+ (WebCore::RTCConfiguration::iceTransports): Added.
+ (WebCore::RTCConfiguration::setIceTransports): Added.
+ (WebCore::RTCConfiguration::requestIdentity): Added.
+ (WebCore::RTCConfiguration::setRequestIdentity): Added.
+ (WebCore::RTCConfiguration::RTCConfiguration): Initialize iceTransports and requestIdentity with the default
+ values.
+
2014-02-19 Antti Koivisto <[email protected]>
Don't call to willBeDeletedFrom(Document&) when destructing document
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (164371 => 164372)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2014-02-19 18:48:35 UTC (rev 164372)
@@ -85,8 +85,16 @@
return nullptr;
}
+ String iceTransports;
+ String requestIdentity;
+ configuration.get("iceTransports", iceTransports);
+ configuration.get("requestIdentity", requestIdentity);
+
RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create();
+ rtcConfiguration->setIceTransports(iceTransports);
+ rtcConfiguration->setRequestIdentity(requestIdentity);
+
for (size_t i = 0; i < numberOfServers; ++i) {
Dictionary iceServer;
ok = iceServers.get(i, iceServer);
Modified: trunk/Source/WebCore/platform/mediastream/RTCConfiguration.h (164371 => 164372)
--- trunk/Source/WebCore/platform/mediastream/RTCConfiguration.h 2014-02-19 18:41:27 UTC (rev 164371)
+++ trunk/Source/WebCore/platform/mediastream/RTCConfiguration.h 2014-02-19 18:48:35 UTC (rev 164372)
@@ -74,11 +74,29 @@
void appendServer(PassRefPtr<RTCIceServer> server) { m_servers.append(server); }
size_t numberOfServers() { return m_servers.size(); }
RTCIceServer* server(size_t index) { return m_servers[index].get(); }
+ const String& iceTransports() const { return m_iceTransports; }
+ void setIceTransports(const String& iceTransports)
+ {
+ if (iceTransports == "none" || iceTransports == "relay" || iceTransports == "all")
+ m_iceTransports = iceTransports;
+ }
+ const String& requestIdentity() const { return m_requestIdentity; }
+ void setRequestIdentity(const String& requestIdentity)
+ {
+ if (requestIdentity == "yes" || requestIdentity == "no" || requestIdentity == "ifconfigured")
+ m_requestIdentity = requestIdentity;
+ }
private:
- RTCConfiguration() { }
+ RTCConfiguration()
+ : m_iceTransports("all")
+ , m_requestIdentity("ifconfigured")
+ {
+ }
Vector<RefPtr<RTCIceServer>> m_servers;
+ String m_iceTransports;
+ String m_requestIdentity;
};
} // namespace WebCore