Source/WebCore/ChangeLog

 12012-07-30 Tommy Widenflycht <tommyw@google.com>
 2
 3 Introduce a minimal RTCPeerConnection together with Dictionary changes
 4 https://bugs.webkit.org/show_bug.cgi?id=92380
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This patch introduces a shell RTCPeerConnection together with neccecary changes to
 9 Dictionary.
 10
 11 The W3C specification can be found here:
 12 http://dev.w3.org/2011/webrtc/editor/webrtc.html#rtcpeerconnection
 13
 14 Since Dictionaries can't be fully copied around adding
 15 get(const String& name, Vector<Dictionary>& result)
 16 isn't feasible so I have added a new ArrayValue class.
 17
 18 Test: fast/mediastream/RTCPeerConnection.html
 19
 20 * CMakeLists.txt:
 21 * GNUmakefile.list.am:
 22 * Modules/mediastream/DOMWindowMediaStream.idl:
 23 * Modules/mediastream/RTCPeerConnection.cpp: Added.
 24 (WebCore):
 25 (RTCIceServer):
 26 (WebCore::RTCIceServer::create):
 27 (WebCore::RTCIceServer::~RTCIceServer):
 28 (WebCore::RTCIceServer::uri):
 29 (WebCore::RTCIceServer::credential):
 30 (WebCore::RTCIceServer::RTCIceServer):
 31 (RTCConfiguration):
 32 (WebCore::RTCConfiguration::create):
 33 (WebCore::RTCConfiguration::~RTCConfiguration):
 34 (WebCore::RTCConfiguration::appendServer):
 35 (WebCore::RTCConfiguration::numberOfServers):
 36 (WebCore::RTCConfiguration::server):
 37 (WebCore::RTCConfiguration::RTCConfiguration):
 38 (WebCore::RTCPeerConnection::parseConfiguration):
 39 (WebCore::RTCPeerConnection::create):
 40 (WebCore::RTCPeerConnection::RTCPeerConnection):
 41 (WebCore::RTCPeerConnection::~RTCPeerConnection):
 42 (WebCore::RTCPeerConnection::interfaceName):
 43 (WebCore::RTCPeerConnection::scriptExecutionContext):
 44 (WebCore::RTCPeerConnection::stop):
 45 (WebCore::RTCPeerConnection::eventTargetData):
 46 (WebCore::RTCPeerConnection::ensureEventTargetData):
 47 * Modules/mediastream/RTCPeerConnection.h: Added.
 48 (WebCore):
 49 (RTCPeerConnection):
 50 (WebCore::RTCPeerConnection::refEventTarget):
 51 (WebCore::RTCPeerConnection::derefEventTarget):
 52 * Modules/mediastream/RTCPeerConnection.idl: Added.
 53 * Target.pri:
 54 * UseJSC.cmake:
 55 * WebCore.gypi:
 56 * WebCore.vcproj/WebCore.vcproj:
 57 * WebCore.xcodeproj/project.pbxproj:
 58 * bindings/generic/RuntimeEnabledFeatures.h:
 59 (WebCore::RuntimeEnabledFeatures::webkitRTCPeerConnectionEnabled):
 60 * bindings/js/ArrayValue.cpp: Added.
 61 (WebCore):
 62 (WebCore::ArrayValue::ArrayValue):
 63 (WebCore::ArrayValue::operator=):
 64 (WebCore::ArrayValue::isUndefinedOrNull):
 65 (WebCore::ArrayValue::length):
 66 (WebCore::ArrayValue::get):
 67 * bindings/js/ArrayValue.h: Added.
 68 (WebCore):
 69 (ArrayValue):
 70 * bindings/js/JSDictionary.cpp:
 71 (WebCore::JSDictionary::convertValue):
 72 (WebCore):
 73 * bindings/js/JSDictionary.h:
 74 (WebCore):
 75 * bindings/v8/ArrayValue.cpp: Added.
 76 (WebCore):
 77 (WebCore::ArrayValue::operator=):
 78 (WebCore::ArrayValue::isUndefinedOrNull):
 79 (WebCore::ArrayValue::length):
 80 (WebCore::ArrayValue::get):
 81 * bindings/v8/ArrayValue.h: Added.
 82 (WebCore):
 83 (ArrayValue):
 84 (WebCore::ArrayValue::ArrayValue):
 85 (WebCore::ArrayValue::~ArrayValue):
 86 * bindings/v8/Dictionary.cpp:
 87 (WebCore::Dictionary::get):
 88 (WebCore):
 89 * bindings/v8/Dictionary.h:
 90 (WebCore):
 91 (Dictionary):
 92 * dom/EventTargetFactory.in:
 93
1942012-07-30 Sheriff Bot <webkit.review.bot@gmail.com>
295
396 Unreviewed, rolling out r124000.

Source/WebCore/CMakeLists.txt

@@SET(WebCore_IDL_FILES
206206 Modules/mediastream/NavigatorUserMediaErrorCallback.idl
207207 Modules/mediastream/NavigatorUserMediaSuccessCallback.idl
208208 Modules/mediastream/PeerConnection00.idl
 209 Modules/mediastream/RTCPeerConnection.idl
209210 Modules/mediastream/SessionDescription.idl
210211
211212 Modules/networkinfo/NavigatorNetworkInfoConnection.idl

@@SET(WebCore_SOURCES
825826 Modules/mediastream/MediaStreamTrackList.cpp
826827 Modules/mediastream/NavigatorMediaStream.cpp
827828 Modules/mediastream/PeerConnection00.cpp
 829 Modules/mediastream/RTCPeerConnection.cpp
828830 Modules/mediastream/SessionDescription.cpp
829831 Modules/mediastream/UserMediaController.cpp
830832 Modules/mediastream/UserMediaRequest.cpp

Source/WebCore/GNUmakefile.list.am

@@webcore_built_sources += \
491491 DerivedSources/WebCore/JSRect.h \
492492 DerivedSources/WebCore/JSRGBColor.cpp \
493493 DerivedSources/WebCore/JSRGBColor.h \
 494 DerivedSources/WebCore/JSRTCPeerConnection.cpp \
 495 DerivedSources/WebCore/JSRTCPeerConnection.h \
494496 DerivedSources/WebCore/JSScreen.cpp \
495497 DerivedSources/WebCore/JSScreen.h \
496498 DerivedSources/WebCore/JSScriptProfile.cpp \

@@dom_binding_idls += \
715717 $(WebCore)/Modules/mediastream/NavigatorUserMediaErrorCallback.idl \
716718 $(WebCore)/Modules/mediastream/NavigatorUserMediaSuccessCallback.idl \
717719 $(WebCore)/Modules/mediastream/PeerConnection00.idl \
 720 $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \
718721 $(WebCore)/Modules/mediastream/SessionDescription.idl \
719722 $(WebCore)/Modules/notifications/Notification.idl \
720723 $(WebCore)/Modules/notifications/NotificationCenter.idl \

@@webcore_modules_sources += \
11991202 Source/WebCore/Modules/mediastream/NavigatorUserMediaSuccessCallback.h \
12001203 Source/WebCore/Modules/mediastream/PeerConnection00.cpp \
12011204 Source/WebCore/Modules/mediastream/PeerConnection00.h \
 1205 Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp \
 1206 Source/WebCore/Modules/mediastream/RTCPeerConnection.h \
12021207 Source/WebCore/Modules/mediastream/SessionDescription.cpp \
12031208 Source/WebCore/Modules/mediastream/SessionDescription.h \
12041209 Source/WebCore/Modules/mediastream/UserMediaClient.h \

@@webcore_sources += \
13641369 Source/WebCore/bindings/generic/GenericBinding.h \
13651370 Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp \
13661371 Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h \
 1372 Source/WebCore/bindings/js/ArrayValue.cpp \
 1373 Source/WebCore/bindings/js/ArrayValue.h \
13671374 Source/WebCore/bindings/js/CachedScriptSourceProvider.h \
13681375 Source/WebCore/bindings/js/CallbackFunction.cpp \
13691376 Source/WebCore/bindings/js/CallbackFunction.h \

Source/WebCore/Modules/mediastream/DOMWindowMediaStream.idl

@@module window {
3232 ] DOMWindowMediaStream {
3333 attribute [V8EnabledAtRuntime] MediaStreamConstructor webkitMediaStream;
3434 attribute [V8EnabledAtRuntime] PeerConnection00Constructor webkitPeerConnection00;
 35 attribute [V8EnabledAtRuntime] RTCPeerConnectionConstructor webkitRTCPeerConnection;
3536 attribute SessionDescriptionConstructor SessionDescription;
3637 attribute IceCandidateConstructor IceCandidate;
3738 attribute MediaStreamEventConstructor MediaStreamEvent;

Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Google Inc. nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#include "config.h"
 32
 33#if ENABLE(MEDIA_STREAM)
 34
 35#include "RTCPeerConnection.h"
 36
 37#include "ArrayValue.h"
 38#include "ExceptionCode.h"
 39#include "KURL.h"
 40#include "ScriptExecutionContext.h"
 41
 42namespace WebCore {
 43
 44// FIXME: RTCIceServer and RTCConfigration are placed here temporarily.
 45// Their final place is in Source/WebCore/platform/mediastream.
 46class RTCIceServer : public RefCounted<RTCIceServer> {
 47public:
 48 static PassRefPtr<RTCIceServer> create(const KURL& uri, const String& credential) { return adoptRef(new RTCIceServer(uri, credential)); }
 49 virtual ~RTCIceServer() { }
 50
 51 const KURL& uri() { return m_uri; }
 52 const String& credential() { return m_credential; }
 53
 54private:
 55 RTCIceServer(const KURL& uri, const String& credential)
 56 : m_uri(uri)
 57 , m_credential(credential)
 58 {
 59 }
 60
 61 KURL m_uri;
 62 String m_credential;
 63};
 64
 65class RTCConfiguration : public RefCounted<RTCConfiguration> {
 66public:
 67 static PassRefPtr<RTCConfiguration> create() { return adoptRef(new RTCConfiguration()); }
 68 virtual ~RTCConfiguration() { }
 69
 70 void appendServer(PassRefPtr<RTCIceServer> server) { m_servers.append(server); }
 71 size_t numberOfServers() { return m_servers.size(); }
 72 RTCIceServer* server(size_t index) { return m_servers[index].get(); }
 73
 74private:
 75 RTCConfiguration() { }
 76
 77 Vector<RefPtr<RTCIceServer> > m_servers;
 78};
 79
 80PassRefPtr<RTCConfiguration> RTCPeerConnection::parseConfiguration(const Dictionary& configuration, ExceptionCode& ec)
 81{
 82 if (configuration.isUndefinedOrNull())
 83 return 0;
 84
 85 ArrayValue iceServers;
 86 bool ok = configuration.get("iceServers", iceServers);
 87 if (!ok) {
 88 ec = TYPE_MISMATCH_ERR;
 89 return 0;
 90 }
 91
 92 size_t numberOfServers;
 93 ok = iceServers.length(numberOfServers);
 94 if (!ok) {
 95 ec = TYPE_MISMATCH_ERR;
 96 return 0;
 97 }
 98
 99 RefPtr<RTCConfiguration> rtcConfiguration = RTCConfiguration::create();
 100
 101 for (size_t i = 0; i < numberOfServers; ++i) {
 102 Dictionary iceServer;
 103 ok = iceServers.get(i, iceServer);
 104 if (!ok) {
 105 ec = TYPE_MISMATCH_ERR;
 106 return 0;
 107 }
 108
 109 String uri, credential;
 110 ok = iceServer.get("uri", uri);
 111 if (!ok) {
 112 ec = TYPE_MISMATCH_ERR;
 113 return 0;
 114 }
 115 KURL url(KURL(), uri);
 116 if (!url.isValid() || !(url.protocolIs("turn") || url.protocolIs("stun"))) {
 117 ec = TYPE_MISMATCH_ERR;
 118 return 0;
 119 }
 120
 121 iceServer.get("credential", credential);
 122
 123 rtcConfiguration->appendServer(RTCIceServer::create(url, credential));
 124 }
 125 return rtcConfiguration.release();
 126}
 127
 128PassRefPtr<RTCPeerConnection> RTCPeerConnection::create(ScriptExecutionContext* context, const Dictionary& rtcConfiguration, const Dictionary&, ExceptionCode& ec)
 129{
 130 RefPtr<RTCConfiguration> configuration = parseConfiguration(rtcConfiguration, ec);
 131 if (ec)
 132 return 0;
 133
 134 RefPtr<RTCPeerConnection> peerConnection = adoptRef(new RTCPeerConnection(context, configuration.release(), ec));
 135 if (ec)
 136 return 0;
 137
 138 peerConnection->suspendIfNeeded();
 139 return peerConnection.release();
 140}
 141
 142RTCPeerConnection::RTCPeerConnection(ScriptExecutionContext* context, PassRefPtr<RTCConfiguration>, ExceptionCode& ec)
 143 : ActiveDOMObject(context, this)
 144{
 145}
 146
 147RTCPeerConnection::~RTCPeerConnection()
 148{
 149}
 150
 151const AtomicString& RTCPeerConnection::interfaceName() const
 152{
 153 return eventNames().interfaceForRTCPeerConnection;
 154}
 155
 156ScriptExecutionContext* RTCPeerConnection::scriptExecutionContext() const
 157{
 158 return ActiveDOMObject::scriptExecutionContext();
 159}
 160
 161void RTCPeerConnection::stop()
 162{
 163 // FIXME: Make sure that this object stops posting events and releases resources at this stage.
 164}
 165
 166EventTargetData* RTCPeerConnection::eventTargetData()
 167{
 168 return &m_eventTargetData;
 169}
 170
 171EventTargetData* RTCPeerConnection::ensureEventTargetData()
 172{
 173 return &m_eventTargetData;
 174}
 175
 176} // namespace WebCore
 177
 178#endif // ENABLE(MEDIA_STREAM)

Source/WebCore/Modules/mediastream/RTCPeerConnection.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Google Inc. nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31#ifndef RTCPeerConnection_h
 32#define RTCPeerConnection_h
 33
 34#if ENABLE(MEDIA_STREAM)
 35
 36#include "ActiveDOMObject.h"
 37#include "Dictionary.h"
 38#include "EventTarget.h"
 39#include "ExceptionBase.h"
 40#include <wtf/RefCounted.h>
 41
 42namespace WebCore {
 43class RTCConfiguration;
 44
 45class RTCPeerConnection : public RefCounted<RTCPeerConnection>, public EventTarget, public ActiveDOMObject {
 46public:
 47 static PassRefPtr<RTCPeerConnection> create(ScriptExecutionContext*, const Dictionary& rtcConfiguration, const Dictionary& mediaConstraints, ExceptionCode&);
 48 ~RTCPeerConnection();
 49
 50 // EventTarget
 51 virtual const AtomicString& interfaceName() const OVERRIDE;
 52 virtual ScriptExecutionContext* scriptExecutionContext() const OVERRIDE;
 53
 54 // ActiveDOMObject
 55 virtual void stop() OVERRIDE;
 56
 57 using RefCounted<RTCPeerConnection>::ref;
 58 using RefCounted<RTCPeerConnection>::deref;
 59
 60private:
 61 RTCPeerConnection(ScriptExecutionContext*, PassRefPtr<RTCConfiguration>, ExceptionCode&);
 62
 63 static PassRefPtr<RTCConfiguration> parseConfiguration(const Dictionary& configuration, ExceptionCode&);
 64
 65 // EventTarget implementation.
 66 virtual EventTargetData* eventTargetData();
 67 virtual EventTargetData* ensureEventTargetData();
 68 virtual void refEventTarget() { ref(); }
 69 virtual void derefEventTarget() { deref(); }
 70 EventTargetData m_eventTargetData;
 71};
 72
 73} // namespace WebCore
 74
 75#endif // ENABLE(MEDIA_STREAM)
 76
 77#endif // RTCPeerConnection_h

Source/WebCore/Modules/mediastream/RTCPeerConnection.idl

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer
 12 * in the documentation and/or other materials provided with the
 13 * distribution.
 14 * 3. Neither the name of Google Inc. nor the names of its contributors
 15 * may be used to endorse or promote products derived from this
 16 * software without specific prior written permission.
 17 *
 18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 29 */
 30
 31module mediastream {
 32
 33 interface [
 34 Conditional=MEDIA_STREAM,
 35 ActiveDOMObject,
 36 Constructor(in Dictionary rtcICEServers, in [Optional=DefaultIsUndefined] Dictionary mediaConstraints),
 37 ConstructorRaisesException,
 38 CallWith=ScriptExecutionContext,
 39 EventTarget
 40 ] RTCPeerConnection {
 41 // EventTarget interface
 42 void addEventListener(in DOMString type,
 43 in EventListener listener,
 44 in [Optional] boolean useCapture);
 45 void removeEventListener(in DOMString type,
 46 in EventListener listener,
 47 in [Optional] boolean useCapture);
 48 boolean dispatchEvent(in Event event)
 49 raises(EventException);
 50 };
 51
 52}

Source/WebCore/Target.pri

@@SOURCES += \
7373
7474SOURCES += \
7575 bindings/ScriptControllerBase.cpp \
 76 bindings/js/ArrayValue.cpp \
7677 bindings/js/CallbackFunction.cpp \
7778 bindings/js/DOMObjectHashTableMap.cpp \
7879 bindings/js/DOMWrapperWorld.cpp \

Source/WebCore/UseJSC.cmake

@@IF (PORT MATCHES "BlackBerry")
2222ENDIF ()
2323
2424LIST(APPEND WebCore_SOURCES
 25 bindings/js/ArrayValue.cpp
2526 bindings/js/CallbackFunction.cpp
2627 bindings/js/DOMObjectHashTableMap.cpp
2728 bindings/js/DOMWrapperWorld.cpp

Source/WebCore/WebCore.gypi

841841 'Modules/mediastream/NavigatorUserMediaErrorCallback.idl',
842842 'Modules/mediastream/NavigatorUserMediaSuccessCallback.idl',
843843 'Modules/mediastream/PeerConnection00.idl',
 844 'Modules/mediastream/RTCPeerConnection.idl',
844845 'Modules/mediastream/SessionDescription.idl',
845846 'Modules/notifications/DOMWindowNotifications.idl',
846847 'Modules/notifications/Notification.idl',

15671568 'Modules/mediastream/NavigatorUserMediaSuccessCallback.h',
15681569 'Modules/mediastream/PeerConnection00.cpp',
15691570 'Modules/mediastream/PeerConnection00.h',
 1571 'Modules/mediastream/RTCPeerConnection.cpp',
 1572 'Modules/mediastream/RTCPeerConnection.h',
15701573 'Modules/mediastream/SessionDescription.cpp',
15711574 'Modules/mediastream/SessionDescription.h',
15721575 'Modules/mediastream/UserMediaClient.h',

19081911 'bindings/gobject/WebKitDOMObject.h',
19091912 'bindings/gobject/WebKitHTMLElementWrapperFactory.cpp',
19101913 'bindings/gobject/WebKitHTMLElementWrapperFactory.h',
 1914 'bindings/js/ArrayValue.cpp',
 1915 'bindings/js/ArrayValue.h',
19111916 'bindings/js/CachedScriptSourceProvider.h',
19121917 'bindings/js/CallbackFunction.cpp',
19131918 'bindings/js/CallbackFunction.h',

21512156 'bindings/objc/ObjCNodeFilterCondition.mm',
21522157 'bindings/objc/PublicDOMInterfaces.h',
21532158 'bindings/objc/WebScriptObject.mm',
 2159 'bindings/v8/ArrayValue.cpp',
 2160 'bindings/v8/ArrayValue.h',
21542161 'bindings/v8/DOMData.cpp',
21552162 'bindings/v8/DOMData.h',
21562163 'bindings/v8/DOMDataStore.cpp',

Source/WebCore/WebCore.vcproj/WebCore.vcproj

6379763797 <Filter
6379863798 Name="js"
6379963799 >
 63800 <File
 63801 RelativePath="..\bindings\js\ArrayValue.cpp"
 63802 >
 63803 <FileConfiguration
 63804 Name="Debug|Win32"
 63805 ExcludedFromBuild="true"
 63806 >
 63807 <Tool
 63808 Name="VCCLCompilerTool"
 63809 />
 63810 </FileConfiguration>
 63811 <FileConfiguration
 63812 Name="Release|Win32"
 63813 ExcludedFromBuild="true"
 63814 >
 63815 <Tool
 63816 Name="VCCLCompilerTool"
 63817 />
 63818 </FileConfiguration>
 63819 <FileConfiguration
 63820 Name="Debug_Cairo_CFLite|Win32"
 63821 ExcludedFromBuild="true"
 63822 >
 63823 <Tool
 63824 Name="VCCLCompilerTool"
 63825 />
 63826 </FileConfiguration>
 63827 <FileConfiguration
 63828 Name="Release_Cairo_CFLite|Win32"
 63829 ExcludedFromBuild="true"
 63830 >
 63831 <Tool
 63832 Name="VCCLCompilerTool"
 63833 />
 63834 </FileConfiguration>
 63835 <FileConfiguration
 63836 Name="Debug_All|Win32"
 63837 ExcludedFromBuild="true"
 63838 >
 63839 <Tool
 63840 Name="VCCLCompilerTool"
 63841 />
 63842 </FileConfiguration>
 63843 <FileConfiguration
 63844 Name="Production|Win32"
 63845 ExcludedFromBuild="true"
 63846 >
 63847 <Tool
 63848 Name="VCCLCompilerTool"
 63849 />
 63850 </FileConfiguration>
 63851 </File>
 63852 <File
 63853 RelativePath="..\bindings\js\ArrayValue.h"
 63854 >
 63855 </File>
6380063856 <File
6380163857 RelativePath="..\bindings\js\CachedScriptSourceProvider.h"
6380263858 >

Source/WebCore/WebCore.xcodeproj/project.pbxproj

12871287 49AE2D97134EE5F90072920A /* CalculationValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 49AE2D95134EE5F90072920A /* CalculationValue.h */; };
12881288 49AF2D6914435D050016A784 /* DisplayRefreshMonitor.h in Headers */ = {isa = PBXBuildFile; fileRef = 49AF2D6814435D050016A784 /* DisplayRefreshMonitor.h */; };
12891289 49AF2D6C14435D210016A784 /* DisplayRefreshMonitorMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49AF2D6B14435D210016A784 /* DisplayRefreshMonitorMac.cpp */; };
 1290 49B3760C15C6C6840059131D /* ArrayValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49B3760A15C6C6840059131D /* ArrayValue.cpp */; };
 1291 49B3760D15C6C6840059131D /* ArrayValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 49B3760B15C6C6840059131D /* ArrayValue.h */; };
12901292 49C7B9931042D2D30009D447 /* JSWebGLBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9801042D2D30009D447 /* JSWebGLBuffer.cpp */; };
12911293 49C7B9941042D2D30009D447 /* JSWebGLBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 49C7B9811042D2D30009D447 /* JSWebGLBuffer.h */; };
12921294 49C7B9951042D2D30009D447 /* JSInt8Array.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 49C7B9821042D2D30009D447 /* JSInt8Array.cpp */; };

83868388 49AE2D95134EE5F90072920A /* CalculationValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CalculationValue.h; sourceTree = "<group>"; };
83878389 49AF2D6814435D050016A784 /* DisplayRefreshMonitor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DisplayRefreshMonitor.h; sourceTree = "<group>"; };
83888390 49AF2D6B14435D210016A784 /* DisplayRefreshMonitorMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayRefreshMonitorMac.cpp; sourceTree = "<group>"; };
 8391 49B3760A15C6C6840059131D /* ArrayValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ArrayValue.cpp; sourceTree = "<group>"; };
 8392 49B3760B15C6C6840059131D /* ArrayValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayValue.h; sourceTree = "<group>"; };
83898393 49C7B9801042D2D30009D447 /* JSWebGLBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLBuffer.cpp; sourceTree = "<group>"; };
83908394 49C7B9811042D2D30009D447 /* JSWebGLBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLBuffer.h; sourceTree = "<group>"; };
83918395 49C7B9821042D2D30009D447 /* JSInt8Array.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInt8Array.cpp; sourceTree = "<group>"; };

2002120025 BCCE58B41061E925008FB35A /* Constructors */,
2002220026 BC4EDEF70C08F414007EDD49 /* Custom */,
2002320027 14DFB33F0A7DF7630018F769 /* Derived Sources */,
 20028 49B3760A15C6C6840059131D /* ArrayValue.cpp */,
 20029 49B3760B15C6C6840059131D /* ArrayValue.h */,
2002420030 BCD533630ED6848900887468 /* CachedScriptSourceProvider.h */,
2002520031 93F8B3060A300FEA00F61AB8 /* CodeGeneratorJS.pm */,
2002620032 312D67B01535691F00563D0D /* Dictionary.cpp */,

2533625342 1059457A15B42A43004D37FD /* JSMicroDataItemValue.h in Headers */,
2533725343 1059459915B42AA0004D37FD /* PropertyNodeList.h in Headers */,
2533825344 1059459F15B42B1A004D37FD /* JSPropertyNodeList.h in Headers */,
 25345 49B3760D15C6C6840059131D /* ArrayValue.h in Headers */,
2533925346 );
2534025347 runOnlyForDeploymentPostprocessing = 0;
2534125348 };

2840528412 1059459715B42A8E004D37FD /* PropertyNodeList.cpp in Sources */,
2840628413 1059459D15B42B0C004D37FD /* JSPropertyNodeList.cpp in Sources */,
2840728414 CD37B39815C1B971006DC898 /* DiagnosticLoggingKeys.cpp in Sources */,
 28415 49B3760C15C6C6840059131D /* ArrayValue.cpp in Sources */,
2840828416 );
2840928417 runOnlyForDeploymentPostprocessing = 0;
2841028418 };

Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h

@@public:
188188 static bool peerConnectionEnabled() { return isMediaStreamEnabled && isPeerConnectionEnabled; }
189189 static void setPeerConnectionEnabled(bool isEnabled) { isPeerConnectionEnabled = isEnabled; }
190190 static bool webkitPeerConnection00Enabled() { return peerConnectionEnabled(); }
 191 static bool webkitRTCPeerConnectionEnabled() { return peerConnectionEnabled(); }
191192#endif
192193
193194#if ENABLE(GAMEPAD)

Source/WebCore/bindings/js/ArrayValue.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "ArrayValue.h"
 28
 29#include "Dictionary.h"
 30#include <runtime/JSArray.h>
 31
 32using namespace JSC;
 33
 34namespace WebCore {
 35
 36ArrayValue::ArrayValue()
 37 : m_exec(0)
 38{
 39}
 40
 41ArrayValue::ArrayValue(JSC::ExecState* exec, JSC::JSValue value)
 42 : m_exec(exec)
 43{
 44 if (!value.isUndefinedOrNull() && isJSArray(value))
 45 m_value = value;
 46}
 47
 48ArrayValue& ArrayValue::operator=(const ArrayValue& other)
 49{
 50 m_exec = other.m_exec;
 51 m_value = other.m_value;
 52 return *this;
 53}
 54
 55bool ArrayValue::isUndefinedOrNull() const
 56{
 57 return m_value.isEmpty() || m_value.isUndefinedOrNull();
 58}
 59
 60bool ArrayValue::length(size_t& length) const
 61{
 62 if (isUndefinedOrNull())
 63 return false;
 64
 65 ASSERT(isJSArray(m_value));
 66
 67 JSArray* array = asArray(m_value);
 68 length = array->length();
 69 return true;
 70}
 71
 72bool ArrayValue::get(size_t index, Dictionary& value) const
 73{
 74 if (isUndefinedOrNull())
 75 return false;
 76
 77 ASSERT(isJSArray(m_value));
 78
 79 JSArray* array = asArray(m_value);
 80 if (!array->canGetIndex(index))
 81 return false;
 82
 83 JSValue indexedValue = array->getIndex(index);
 84 if (indexedValue.isUndefinedOrNull() || !indexedValue.isObject())
 85 return false;
 86
 87 value = Dictionary(m_exec, indexedValue);
 88 return true;
 89}
 90
 91} // namespace WebCore

Source/WebCore/bindings/js/ArrayValue.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef ArrayValue_h
 27#define ArrayValue_h
 28
 29#include <interpreter/CallFrame.h>
 30
 31namespace WebCore {
 32
 33class Dictionary;
 34
 35class ArrayValue {
 36public:
 37 ArrayValue();
 38 ArrayValue(JSC::ExecState*, JSC::JSValue);
 39
 40 ArrayValue& operator=(const ArrayValue&);
 41
 42 bool isUndefinedOrNull() const;
 43
 44 bool length(size_t&) const;
 45 bool get(size_t index, Dictionary&) const;
 46
 47private:
 48 JSC::ExecState* m_exec;
 49 JSC::JSValue m_value;
 50};
 51
 52}
 53
 54#endif // ArrayValue_h

Source/WebCore/bindings/js/JSDictionary.cpp

2626#include "config.h"
2727#include "JSDictionary.h"
2828
 29#include "ArrayValue.h"
2930#include "Dictionary.h"
3031#include "JSDOMWindow.h"
3132#include "JSEventTarget.h"

3334#include "JSNode.h"
3435#include "JSStorage.h"
3536#include "JSTrackCustom.h"
36 #include "SerializedScriptValue.h"
3737#include "ScriptValue.h"
 38#include "SerializedScriptValue.h"
3839#include <wtf/HashMap.h>
3940#include <wtf/MathExtras.h>
4041#include <wtf/text/AtomicString.h>

@@void JSDictionary::convertValue(ExecState* exec, JSValue value, HashSet<AtomicSt
185186}
186187#endif
187188
 189void JSDictionary::convertValue(ExecState* exec, JSValue value, ArrayValue& result)
 190{
 191 result = ArrayValue(exec, value);
 192}
 193
188194bool JSDictionary::getWithUndefinedOrNullCheck(const String& propertyName, String& result) const
189195{
190196 JSValue value;

Source/WebCore/bindings/js/JSDictionary.h

3232
3333namespace WebCore {
3434
 35class ArrayValue;
3536class Dictionary;
3637class DOMWindow;
3738class EventTarget;

@@private:
105106#if ENABLE(MUTATION_OBSERVERS) || ENABLE(WEB_INTENTS)
106107 static void convertValue(JSC::ExecState*, JSC::JSValue, HashSet<AtomicString>& result);
107108#endif
 109 static void convertValue(JSC::ExecState*, JSC::JSValue, ArrayValue& result);
108110
109111 JSC::ExecState* m_exec;
110112 JSC::JSObject* m_initializerObject;

Source/WebCore/bindings/v8/ArrayValue.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "ArrayValue.h"
 28
 29#include "Dictionary.h"
 30#include "V8Binding.h"
 31
 32namespace WebCore {
 33
 34ArrayValue& ArrayValue::operator=(const ArrayValue& other)
 35{
 36 m_array = other.m_array;
 37 return *this;
 38}
 39
 40bool ArrayValue::isUndefinedOrNull() const
 41{
 42 if (m_array.IsEmpty())
 43 return true;
 44 return WebCore::isUndefinedOrNull(m_array);
 45}
 46
 47bool ArrayValue::length(size_t& length) const
 48{
 49 if (isUndefinedOrNull())
 50 return false;
 51
 52 length = m_array->Length();
 53 return true;
 54}
 55
 56bool ArrayValue::get(size_t index, Dictionary& value) const
 57{
 58 if (isUndefinedOrNull())
 59 return false;
 60
 61 if (index >= m_array->Length())
 62 return false;
 63
 64 v8::Local<v8::Value> indexedValue = m_array->Get(v8UnsignedInteger(index));
 65 if (indexedValue.IsEmpty() || !indexedValue->IsObject())
 66 return false;
 67
 68 value = Dictionary(indexedValue);
 69 return true;
 70}
 71
 72} // namespace WebCore

Source/WebCore/bindings/v8/ArrayValue.h

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 *
 8 * 1. Redistributions of source code must retain the above copyright
 9 * notice, this list of conditions and the following disclaimer.
 10 * 2. Redistributions in binary form must reproduce the above copyright
 11 * notice, this list of conditions and the following disclaimer in the
 12 * documentation and/or other materials provided with the distribution.
 13 *
 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#ifndef ArrayValue_h
 27#define ArrayValue_h
 28
 29#include <v8.h>
 30
 31namespace WebCore {
 32
 33class Dictionary;
 34
 35class ArrayValue {
 36public:
 37 ArrayValue() { }
 38 explicit ArrayValue(const v8::Local<v8::Array>& array) : m_array(array) { }
 39 ~ArrayValue() { }
 40
 41 ArrayValue& operator=(const ArrayValue&);
 42
 43 bool isUndefinedOrNull() const;
 44
 45 bool length(size_t&) const;
 46 bool get(size_t index, Dictionary&) const;
 47
 48private:
 49 // This object can only be used safely when stack allocated because of v8::Local.
 50 static void* operator new(size_t);
 51 static void* operator new[](size_t);
 52 static void operator delete(void *);
 53
 54 v8::Local<v8::Array> m_array;
 55};
 56
 57}
 58
 59#endif // ArrayValue_h

Source/WebCore/bindings/v8/Dictionary.cpp

2626#include "config.h"
2727#include "Dictionary.h"
2828
 29#include "ArrayValue.h"
2930#include "DOMStringList.h"
3031#include "V8Binding.h"
3132#include "V8DOMWindow.h"

@@bool Dictionary::get(const String& key, Vector<String>& value) const
442443 return true;
443444}
444445
 446bool Dictionary::get(const String& key, ArrayValue& value) const
 447{
 448 v8::Local<v8::Value> v8Value;
 449 if (!getKey(key, v8Value))
 450 return false;
 451
 452 if (!v8Value->IsArray())
 453 return false;
 454
 455 value = ArrayValue(v8::Local<v8::Array>::Cast(v8Value));
 456 return true;
 457}
 458
445459bool Dictionary::getOwnPropertiesAsStringHashMap(WTF::HashMap<String, String>& hashMap) const
446460{
447461 if (!isObject())

Source/WebCore/bindings/v8/Dictionary.h

3838
3939namespace WebCore {
4040
 41class ArrayValue;
4142class DOMWindow;
4243class IDBKeyRange;
4344class MediaKeyError;

@@public:
8687 bool get(const String&, HashSet<AtomicString>&) const;
8788 bool get(const String&, Dictionary&) const;
8889 bool get(const String&, Vector<String>&) const;
 90 bool get(const String&, ArrayValue&) const;
 91
8992 bool getOwnPropertiesAsStringHashMap(WTF::HashMap<String, String>&) const;
9093
9194 bool getWithUndefinedOrNullCheck(const String&, String&) const;

Source/WebCore/dom/EventTargetFactory.in

@@Node
2424Notification conditional=NOTIFICATIONS|LEGACY_NOTIFICATIONS
2525PeerConnection00 conditional=MEDIA_STREAM
2626Performance conditional=WEB_TIMING
 27RTCPeerConnection conditional=MEDIA_STREAM
2728SharedWorker conditional=SHARED_WORKERS
2829SharedWorkerContext conditional=SHARED_WORKERS
2930SourceBufferList conditional=MEDIA_SOURCE

LayoutTests/fast/mediastream/RTCPeerConnection-expected.txt

 1Tests the RTCPeerConnection constructor.
 2
 3On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 4
 5
 6PASS new webkitRTCPeerConnection(null); did not throw exception.
 7PASS new webkitRTCPeerConnection(null, null); did not throw exception.
 8PASS new webkitRTCPeerConnection(undefined); did not throw exception.
 9PASS new webkitRTCPeerConnection(undefined, undefined); did not throw exception.
 10PASS new webkitRTCPeerConnection({iceServers:[]}, null); did not throw exception.
 11PASS new webkitRTCPeerConnection({iceServers:[{uri:'stun:foo.com'}]}, null); did not throw exception.
 12PASS new webkitRTCPeerConnection({iceServers:[{uri:'turn:foo.com', credential:'x'}]}, null); did not throw exception.
 13PASS new webkitRTCPeerConnection({iceServers:[{uri:'turn:foo.com', credential:'x'},{uri:'stun:bar.com'}]}, null); did not throw exception.
 14PASS new webkitRTCPeerConnection(); threw exception TypeError: Not enough arguments.
 15PASS new webkitRTCPeerConnection(''); threw exception TypeError: Not an object..
 16PASS new webkitRTCPeerConnection(null, ''); threw exception TypeError: Not an object..
 17PASS new webkitRTCPeerConnection({fooServers:[]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 18PASS new webkitRTCPeerConnection({iceServers:true}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 19PASS new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 20PASS new webkitRTCPeerConnection({iceServers:[{}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 21PASS new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null); threw exception Error: TYPE_MISMATCH_ERR: DOM Exception 17.
 22PASS successfullyParsed is true
 23
 24TEST COMPLETE
 25

LayoutTests/fast/mediastream/RTCPeerConnection.html

 1<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
 2<html>
 3<head>
 4<script src="../js/resources/js-test-pre.js"></script>
 5</head>
 6<body>
 7<script>
 8description("Tests the RTCPeerConnection constructor.");
 9
 10shouldNotThrow("new webkitRTCPeerConnection(null);");
 11shouldNotThrow("new webkitRTCPeerConnection(null, null);");
 12shouldNotThrow("new webkitRTCPeerConnection(undefined);");
 13shouldNotThrow("new webkitRTCPeerConnection(undefined, undefined);");
 14shouldNotThrow("new webkitRTCPeerConnection({iceServers:[]}, null);");
 15shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{uri:'stun:foo.com'}]}, null);");
 16shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{uri:'turn:foo.com', credential:'x'}]}, null);");
 17shouldNotThrow("new webkitRTCPeerConnection({iceServers:[{uri:'turn:foo.com', credential:'x'},{uri:'stun:bar.com'}]}, null);");
 18
 19shouldThrow("new webkitRTCPeerConnection();");
 20shouldThrow("new webkitRTCPeerConnection('');");
 21shouldThrow("new webkitRTCPeerConnection(null, '');");
 22shouldThrow("new webkitRTCPeerConnection({fooServers:[]}, null);");
 23shouldThrow("new webkitRTCPeerConnection({iceServers:true}, null);");
 24shouldThrow("new webkitRTCPeerConnection({iceServers:[1, 2, 3]}, null);");
 25shouldThrow("new webkitRTCPeerConnection({iceServers:[{}]}, null);");
 26shouldThrow("new webkitRTCPeerConnection({iceServers:[{url:'foo'}]}, null);");
 27</script>
 28<script src="../js/resources/js-test-post.js"></script>
 29</body>
 30</html>