Log Message
Get rid of WTF/Functional.h https://bugs.webkit.org/show_bug.cgi?id=158081 Reviewed by Chris Dumez.
Source/WebCore: * Modules/mediastream/MediaStreamTrack.cpp: Source/WTF: This is no longer used, and removing it will free up the name for a new Functional.h implementation. * WTF.xcodeproj/project.pbxproj: * wtf/Functional.h: Removed. (WTF::RefAndDeref::ref): Deleted. (WTF::RefAndDeref::deref): Deleted. (WTF::ParamStorageTraits::wrap): Deleted. (WTF::ParamStorageTraits::unwrap): Deleted. (WTF::ParamStorageTraits<PassRefPtr<T>>::wrap): Deleted. (WTF::ParamStorageTraits<PassRefPtr<T>>::unwrap): Deleted. (WTF::ParamStorageTraits<RefPtr<T>>::wrap): Deleted. (WTF::ParamStorageTraits<RefPtr<T>>::unwrap): Deleted. (WTF::ParamStorageTraits<RetainPtr<T>>::wrap): Deleted. (WTF::ParamStorageTraits<RetainPtr<T>>::unwrap): Deleted. (WTF::FunctionImplBase::~FunctionImplBase): Deleted. (WTF::FunctionBase::isNull): Deleted. (WTF::FunctionBase::FunctionBase): Deleted. (WTF::FunctionBase::impl): Deleted. (WTF::bind): Deleted. * wtf/mac/DeprecatedSymbolsUsedBySafari.mm: Tools: * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: * TestWebKitAPI/Tests/WTF/Functional.cpp: Removed. (TestWebKitAPI::returnFortyTwo): Deleted. (TestWebKitAPI::TEST): Deleted. (TestWebKitAPI::multiplyByTwo): Deleted. (TestWebKitAPI::multiplyByOneAndAHalf): Deleted. (TestWebKitAPI::multiply): Deleted. (TestWebKitAPI::subtract): Deleted. (TestWebKitAPI::A::A): Deleted. (TestWebKitAPI::A::f): Deleted. (TestWebKitAPI::A::addF): Deleted. (TestWebKitAPI::B::B): Deleted. (TestWebKitAPI::B::~B): Deleted. (TestWebKitAPI::B::ref): Deleted. (TestWebKitAPI::B::deref): Deleted. (TestWebKitAPI::B::f): Deleted. (TestWebKitAPI::B::g): Deleted. (TestWebKitAPI::Number::create): Deleted. (TestWebKitAPI::Number::~Number): Deleted. (TestWebKitAPI::Number::value): Deleted. (TestWebKitAPI::Number::Number): Deleted. (TestWebKitAPI::multiplyNumberByTwo): Deleted.
Modified Paths
- trunk/Source/WTF/ChangeLog
- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj
- trunk/Source/WTF/wtf/CMakeLists.txt
- trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm
- trunk/Source/WebCore/ChangeLog
- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
- trunk/Tools/ChangeLog
- trunk/Tools/TestWebKitAPI/CMakeLists.txt
- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Removed Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (201405 => 201406)
--- trunk/Source/WTF/ChangeLog 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WTF/ChangeLog 2016-05-25 22:56:58 UTC (rev 201406)
@@ -1,3 +1,31 @@
+2016-05-25 Anders Carlsson <[email protected]>
+
+ Get rid of WTF/Functional.h
+ https://bugs.webkit.org/show_bug.cgi?id=158081
+
+ Reviewed by Chris Dumez.
+
+ This is no longer used, and removing it will free up the name for a new Functional.h implementation.
+
+ * WTF.xcodeproj/project.pbxproj:
+ * wtf/Functional.h: Removed.
+ (WTF::RefAndDeref::ref): Deleted.
+ (WTF::RefAndDeref::deref): Deleted.
+ (WTF::ParamStorageTraits::wrap): Deleted.
+ (WTF::ParamStorageTraits::unwrap): Deleted.
+ (WTF::ParamStorageTraits<PassRefPtr<T>>::wrap): Deleted.
+ (WTF::ParamStorageTraits<PassRefPtr<T>>::unwrap): Deleted.
+ (WTF::ParamStorageTraits<RefPtr<T>>::wrap): Deleted.
+ (WTF::ParamStorageTraits<RefPtr<T>>::unwrap): Deleted.
+ (WTF::ParamStorageTraits<RetainPtr<T>>::wrap): Deleted.
+ (WTF::ParamStorageTraits<RetainPtr<T>>::unwrap): Deleted.
+ (WTF::FunctionImplBase::~FunctionImplBase): Deleted.
+ (WTF::FunctionBase::isNull): Deleted.
+ (WTF::FunctionBase::FunctionBase): Deleted.
+ (WTF::FunctionBase::impl): Deleted.
+ (WTF::bind): Deleted.
+ * wtf/mac/DeprecatedSymbolsUsedBySafari.mm:
+
2016-05-24 Keith Miller <[email protected]>
LLInt should be able to cache prototype loads for values in GetById
Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (201405 => 201406)
--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj 2016-05-25 22:56:58 UTC (rev 201406)
@@ -187,7 +187,6 @@
A8A473C3151A825B004123FF /* FastMalloc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A8A472A1151A825A004123FF /* FastMalloc.cpp */; };
A8A473C4151A825B004123FF /* FastMalloc.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472A2151A825A004123FF /* FastMalloc.h */; };
A8A473C8151A825B004123FF /* Forward.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472A6151A825A004123FF /* Forward.h */; };
- A8A473C9151A825B004123FF /* Functional.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472A7151A825A004123FF /* Functional.h */; };
A8A473CA151A825B004123FF /* GetPtr.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472A8151A825A004123FF /* GetPtr.h */; };
A8A473D3151A825B004123FF /* HashCountedSet.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472B3151A825A004123FF /* HashCountedSet.h */; };
A8A473D4151A825B004123FF /* HashFunctions.h in Headers */ = {isa = PBXBuildFile; fileRef = A8A472B4151A825A004123FF /* HashFunctions.h */; };
@@ -301,12 +300,12 @@
CD5497AD15857D0300B5BC30 /* MediaTime.h in Headers */ = {isa = PBXBuildFile; fileRef = CD5497AB15857D0300B5BC30 /* MediaTime.h */; };
CE46516E19DB1FB4003ECA05 /* NSMapTableSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */; };
CE73E02519DCB7AB00580D5C /* XPCSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CE73E02419DCB7AB00580D5C /* XPCSPI.h */; };
- DCEE22051CEB9869000C2396 /* BackwardsGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE22041CEB9869000C2396 /* BackwardsGraph.h */; };
DCEE21FB1CEA7538000C2396 /* CFBundleSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */; };
DCEE22001CEA7551000C2396 /* BlockObjCExceptions.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FC1CEA7551000C2396 /* BlockObjCExceptions.h */; };
DCEE22011CEA7551000C2396 /* BlockObjCExceptions.mm in Sources */ = {isa = PBXBuildFile; fileRef = DCEE21FD1CEA7551000C2396 /* BlockObjCExceptions.mm */; };
DCEE22021CEA7551000C2396 /* PlatformUserPreferredLanguages.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE21FE1CEA7551000C2396 /* PlatformUserPreferredLanguages.h */; };
DCEE22031CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = DCEE21FF1CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm */; };
+ DCEE22051CEB9869000C2396 /* BackwardsGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = DCEE22041CEB9869000C2396 /* BackwardsGraph.h */; };
DE5A09FC1BA36992003D4424 /* CommonCryptoSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = DE5A09FB1BA36992003D4424 /* CommonCryptoSPI.h */; };
E15556F518A0CC18006F48FB /* CryptographicUtilities.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */; };
E15556F618A0CC18006F48FB /* CryptographicUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = E15556F418A0CC18006F48FB /* CryptographicUtilities.h */; };
@@ -514,7 +513,6 @@
A8A472A1151A825A004123FF /* FastMalloc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FastMalloc.cpp; sourceTree = "<group>"; };
A8A472A2151A825A004123FF /* FastMalloc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FastMalloc.h; sourceTree = "<group>"; };
A8A472A6151A825A004123FF /* Forward.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Forward.h; sourceTree = "<group>"; };
- A8A472A7151A825A004123FF /* Functional.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Functional.h; sourceTree = "<group>"; };
A8A472A8151A825A004123FF /* GetPtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GetPtr.h; sourceTree = "<group>"; };
A8A472B3151A825A004123FF /* HashCountedSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashCountedSet.h; sourceTree = "<group>"; };
A8A472B4151A825A004123FF /* HashFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HashFunctions.h; sourceTree = "<group>"; };
@@ -628,12 +626,12 @@
CD5497AB15857D0300B5BC30 /* MediaTime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaTime.h; sourceTree = "<group>"; };
CE46516D19DB1FB4003ECA05 /* NSMapTableSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSMapTableSPI.h; sourceTree = "<group>"; };
CE73E02419DCB7AB00580D5C /* XPCSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPCSPI.h; sourceTree = "<group>"; };
- DCEE22041CEB9869000C2396 /* BackwardsGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackwardsGraph.h; sourceTree = "<group>"; };
DCEE21FA1CEA7538000C2396 /* CFBundleSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CFBundleSPI.h; path = cf/CFBundleSPI.h; sourceTree = "<group>"; };
DCEE21FC1CEA7551000C2396 /* BlockObjCExceptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlockObjCExceptions.h; sourceTree = "<group>"; };
DCEE21FD1CEA7551000C2396 /* BlockObjCExceptions.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BlockObjCExceptions.mm; sourceTree = "<group>"; };
DCEE21FE1CEA7551000C2396 /* PlatformUserPreferredLanguages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformUserPreferredLanguages.h; sourceTree = "<group>"; };
DCEE21FF1CEA7551000C2396 /* PlatformUserPreferredLanguagesMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformUserPreferredLanguagesMac.mm; sourceTree = "<group>"; };
+ DCEE22041CEB9869000C2396 /* BackwardsGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BackwardsGraph.h; sourceTree = "<group>"; };
DE5A09FB1BA36992003D4424 /* CommonCryptoSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CommonCryptoSPI.h; sourceTree = "<group>"; };
E15556F318A0CC18006F48FB /* CryptographicUtilities.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CryptographicUtilities.cpp; sourceTree = "<group>"; };
E15556F418A0CC18006F48FB /* CryptographicUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CryptographicUtilities.h; sourceTree = "<group>"; };
@@ -826,7 +824,6 @@
0F9D335C165DBA73005AD387 /* FilePrintStream.h */,
0F2B66A517B6B4F700A7AE3F /* FlipBytes.h */,
A8A472A6151A825A004123FF /* Forward.h */,
- A8A472A7151A825A004123FF /* Functional.h */,
1A1D8B9D1731879800141DA4 /* FunctionDispatcher.cpp */,
1A1D8B9B173186CE00141DA4 /* FunctionDispatcher.h */,
A8A472A8151A825A004123FF /* GetPtr.h */,
@@ -1221,7 +1218,6 @@
A8A473B6151A825B004123FF /* fixed-dtoa.h in Headers */,
0F2B66A717B6B4FD00A7AE3F /* FlipBytes.h in Headers */,
A8A473C8151A825B004123FF /* Forward.h in Headers */,
- A8A473C9151A825B004123FF /* Functional.h in Headers */,
1A1D8B9C173186CE00141DA4 /* FunctionDispatcher.h in Headers */,
A8A473CA151A825B004123FF /* GetPtr.h in Headers */,
0FEC84AF1BD825310080FF74 /* GraphNodeWorklist.h in Headers */,
Modified: trunk/Source/WTF/wtf/CMakeLists.txt (201405 => 201406)
--- trunk/Source/WTF/wtf/CMakeLists.txt 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WTF/wtf/CMakeLists.txt 2016-05-25 22:56:58 UTC (rev 201406)
@@ -30,7 +30,6 @@
FlipBytes.h
Forward.h
FunctionDispatcher.h
- Functional.h
GetPtr.h
GraphNodeWorklist.h
GregorianDateTime.h
Deleted: trunk/Source/WTF/wtf/Functional.h (201405 => 201406)
--- trunk/Source/WTF/wtf/Functional.h 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WTF/wtf/Functional.h 2016-05-25 22:56:58 UTC (rev 201406)
@@ -1,782 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WTF_Functional_h
-#define WTF_Functional_h
-
-#include <wtf/Assertions.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/RefPtr.h>
-#include <wtf/ThreadSafeRefCounted.h>
-#include <wtf/WeakPtr.h>
-
-#if OS(DARWIN) && COMPILER_SUPPORTS(BLOCKS)
-#include <Block.h>
-#include <wtf/ObjcRuntimeExtras.h>
-#endif
-
-namespace WTF {
-
-// Functional.h provides a very simple way to bind a function pointer and arguments together into a function object
-// that can be stored, copied and invoked, similar to how boost::bind and std::bind in C++11.
-
-// Helper class template to determine whether a given type has ref and deref member functions
-// with the right type signature.
-template<typename T>
-class HasRefAndDeref {
- typedef char YesType;
- struct NoType {
- char padding[8];
- };
-
- struct BaseMixin {
- void deref();
- void ref();
- };
-
- struct Base : public T, public BaseMixin { };
-
- template<typename U, U> struct
- TypeChecker { };
-
- template<typename U>
- static NoType refCheck(U*, TypeChecker<void (BaseMixin::*)(), &U::ref>* = 0);
- static YesType refCheck(...);
-
- template<typename U>
- static NoType derefCheck(U*, TypeChecker<void (BaseMixin::*)(), &U::deref>* = 0);
- static YesType derefCheck(...);
-
-public:
- static const bool value = sizeof(refCheck(static_cast<Base*>(0))) == sizeof(YesType) && sizeof(derefCheck(static_cast<Base*>(0))) == sizeof(YesType);
-};
-
-// A FunctionWrapper is a class template that can wrap a function pointer or a member function pointer and
-// provide a unified interface for calling that function.
-template<typename>
-class FunctionWrapper;
-
-// Bound static functions:
-
-template<typename R>
-class FunctionWrapper<R (*)()> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)())
- : m_function(function)
- {
- }
-
- R operator()()
- {
- return m_function();
- }
-
-private:
- R (*m_function)();
-};
-
-template<typename R, typename P1>
-class FunctionWrapper<R (*)(P1)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)(P1))
- : m_function(function)
- {
- }
-
- R operator()(P1 p1)
- {
- return m_function(p1);
- }
-
-private:
- R (*m_function)(P1);
-};
-
-template<typename R, typename P1, typename P2>
-class FunctionWrapper<R (*)(P1, P2)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)(P1, P2))
- : m_function(function)
- {
- }
-
- R operator()(P1 p1, P2 p2)
- {
- return m_function(p1, p2);
- }
-
-private:
- R (*m_function)(P1, P2);
-};
-
-template<typename R, typename P1, typename P2, typename P3>
-class FunctionWrapper<R (*)(P1, P2, P3)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)(P1, P2, P3))
- : m_function(function)
- {
- }
-
- R operator()(P1 p1, P2 p2, P3 p3)
- {
- return m_function(p1, p2, p3);
- }
-
-private:
- R (*m_function)(P1, P2, P3);
-};
-
-template<typename R, typename P1, typename P2, typename P3, typename P4>
-class FunctionWrapper<R (*)(P1, P2, P3, P4)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)(P1, P2, P3, P4))
- : m_function(function)
- {
- }
-
- R operator()(P1 p1, P2 p2, P3 p3, P4 p4)
- {
- return m_function(p1, p2, p3, p4);
- }
-
-private:
- R (*m_function)(P1, P2, P3, P4);
-};
-
-template<typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
-class FunctionWrapper<R (*)(P1, P2, P3, P4, P5)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (*function)(P1, P2, P3, P4, P5))
- : m_function(function)
- {
- }
-
- R operator()(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
- {
- return m_function(p1, p2, p3, p4, p5);
- }
-
-private:
- R (*m_function)(P1, P2, P3, P4, P5);
-};
-
-// Bound member functions:
-
-template<typename R, typename C>
-class FunctionWrapper<R (C::*)()> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)())
- : m_function(function)
- {
- }
-
- R operator()(C* c)
- {
- return (c->*m_function)();
- }
-
- R operator()(const WeakPtr<C>& c)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)();
- }
-
-private:
- R (C::*m_function)();
-};
-
-template<typename R, typename C, typename P1>
-class FunctionWrapper<R (C::*)(P1)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)(P1))
- : m_function(function)
- {
- }
-
- R operator()(C* c, P1 p1)
- {
- return (c->*m_function)(p1);
- }
-
- R operator()(const WeakPtr<C>& c, P1 p1)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)(p1);
- }
-
-private:
- R (C::*m_function)(P1);
-};
-
-template<typename R, typename C, typename P1, typename P2>
-class FunctionWrapper<R (C::*)(P1, P2)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)(P1, P2))
- : m_function(function)
- {
- }
-
- R operator()(C* c, P1 p1, P2 p2)
- {
- return (c->*m_function)(p1, p2);
- }
-
- R operator()(const WeakPtr<C>& c, P1 p1, P2 p2)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)(p1, p2);
- }
-
-private:
- R (C::*m_function)(P1, P2);
-};
-
-template<typename R, typename C, typename P1, typename P2, typename P3>
-class FunctionWrapper<R (C::*)(P1, P2, P3)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)(P1, P2, P3))
- : m_function(function)
- {
- }
-
- R operator()(C* c, P1 p1, P2 p2, P3 p3)
- {
- return (c->*m_function)(p1, p2, p3);
- }
-
- R operator()(const WeakPtr<C>& c, P1 p1, P2 p2, P3 p3)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)(p1, p2, p3);
- }
-
-private:
- R (C::*m_function)(P1, P2, P3);
-};
-
-template<typename R, typename C, typename P1, typename P2, typename P3, typename P4>
-class FunctionWrapper<R (C::*)(P1, P2, P3, P4)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)(P1, P2, P3, P4))
- : m_function(function)
- {
- }
-
- R operator()(C* c, P1 p1, P2 p2, P3 p3, P4 p4)
- {
- return (c->*m_function)(p1, p2, p3, p4);
- }
-
- R operator()(const WeakPtr<C>& c, P1 p1, P2 p2, P3 p3, P4 p4)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)(p1, p2, p3, p4);
- }
-
-private:
- R (C::*m_function)(P1, P2, P3, P4);
-};
-
-template<typename R, typename C, typename P1, typename P2, typename P3, typename P4, typename P5>
-class FunctionWrapper<R (C::*)(P1, P2, P3, P4, P5)> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = HasRefAndDeref<C>::value;
-
- explicit FunctionWrapper(R (C::*function)(P1, P2, P3, P4, P5))
- : m_function(function)
- {
- }
-
- R operator()(C* c, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
- {
- return (c->*m_function)(p1, p2, p3, p4, p5);
- }
-
- R operator()(const WeakPtr<C>& c, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
- {
- C* obj = c.get();
- if (!obj)
- return R();
- return (obj->*m_function)(p1, p2, p3, p4, p5);
- }
-
-private:
- R (C::*m_function)(P1, P2, P3, P4, P5);
-};
-
-#if OS(DARWIN) && COMPILER_SUPPORTS(BLOCKS)
-template<typename R>
-class FunctionWrapper<R (^)()> {
-public:
- typedef R ResultType;
- static const bool shouldRefFirstParameter = false;
-
- explicit FunctionWrapper(R (^block)())
- : m_block(Block_copy(block))
- {
- }
-
- FunctionWrapper(const FunctionWrapper& other)
- : m_block(Block_copy(other.m_block))
- {
- }
-
- ~FunctionWrapper()
- {
- Block_release(m_block);
- }
-
- R operator()()
- {
- return m_block();
- }
-
-private:
- R (^m_block)();
-};
-#endif
-
-template<typename T, bool shouldRefAndDeref> struct RefAndDeref {
- static void ref(T) { }
- static void deref(T) { }
-};
-
-template<typename T> struct RefAndDeref<T*, true> {
- static void ref(T* t) { t->ref(); }
- static void deref(T* t) { t->deref(); }
-};
-
-template<typename T> struct ParamStorageTraits {
- typedef T StorageType;
-
- static StorageType wrap(const T& value) { return value; }
- static const T& unwrap(const StorageType& value) { return value; }
-};
-
-template<typename T> struct ParamStorageTraits<PassRefPtr<T>> {
- typedef RefPtr<T> StorageType;
-
- static StorageType wrap(PassRefPtr<T> value) { return value; }
- static T* unwrap(const StorageType& value) { return value.get(); }
-};
-
-template<typename T> struct ParamStorageTraits<RefPtr<T>> {
- typedef RefPtr<T> StorageType;
-
- static StorageType wrap(RefPtr<T> value) { return value.release(); }
- static T* unwrap(const StorageType& value) { return value.get(); }
-};
-
-template<typename> class RetainPtr;
-
-template<typename T> struct ParamStorageTraits<RetainPtr<T>> {
- typedef RetainPtr<T> StorageType;
-
- static StorageType wrap(const RetainPtr<T>& value) { return value; }
- static typename RetainPtr<T>::PtrType unwrap(const StorageType& value) { return value.get(); }
-};
-
-class FunctionImplBase : public ThreadSafeRefCounted<FunctionImplBase> {
-public:
- virtual ~FunctionImplBase() { }
-};
-
-template<typename>
-class FunctionImpl;
-
-template<typename R>
-class FunctionImpl<R ()> : public FunctionImplBase {
-public:
- virtual R operator()() = 0;
-};
-
-template<typename FunctionWrapper, typename FunctionType>
-class BoundFunctionImpl;
-
-template<typename FunctionWrapper, typename R>
-class BoundFunctionImpl<FunctionWrapper, R ()> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- explicit BoundFunctionImpl(FunctionWrapper functionWrapper)
- : m_functionWrapper(functionWrapper)
- {
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper();
- }
-
-private:
- FunctionWrapper m_functionWrapper;
-};
-
-template<typename FunctionWrapper, typename R, typename P1>
-class BoundFunctionImpl<FunctionWrapper, R (P1)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
-};
-
-template<typename FunctionWrapper, typename R, typename P1, typename P2>
-class BoundFunctionImpl<FunctionWrapper, R (P1, P2)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1, const P2& p2)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- , m_p2(ParamStorageTraits<P2>::wrap(p2))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
- typename ParamStorageTraits<P2>::StorageType m_p2;
-};
-
-template<typename FunctionWrapper, typename R, typename P1, typename P2, typename P3>
-class BoundFunctionImpl<FunctionWrapper, R (P1, P2, P3)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1, const P2& p2, const P3& p3)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- , m_p2(ParamStorageTraits<P2>::wrap(p2))
- , m_p3(ParamStorageTraits<P3>::wrap(p3))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2), ParamStorageTraits<P3>::unwrap(m_p3));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
- typename ParamStorageTraits<P2>::StorageType m_p2;
- typename ParamStorageTraits<P3>::StorageType m_p3;
-};
-
-template<typename FunctionWrapper, typename R, typename P1, typename P2, typename P3, typename P4>
-class BoundFunctionImpl<FunctionWrapper, R (P1, P2, P3, P4)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1, const P2& p2, const P3& p3, const P4& p4)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- , m_p2(ParamStorageTraits<P2>::wrap(p2))
- , m_p3(ParamStorageTraits<P3>::wrap(p3))
- , m_p4(ParamStorageTraits<P4>::wrap(p4))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2), ParamStorageTraits<P3>::unwrap(m_p3), ParamStorageTraits<P4>::unwrap(m_p4));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
- typename ParamStorageTraits<P2>::StorageType m_p2;
- typename ParamStorageTraits<P3>::StorageType m_p3;
- typename ParamStorageTraits<P4>::StorageType m_p4;
-};
-
-template<typename FunctionWrapper, typename R, typename P1, typename P2, typename P3, typename P4, typename P5>
-class BoundFunctionImpl<FunctionWrapper, R (P1, P2, P3, P4, P5)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- , m_p2(ParamStorageTraits<P2>::wrap(p2))
- , m_p3(ParamStorageTraits<P3>::wrap(p3))
- , m_p4(ParamStorageTraits<P4>::wrap(p4))
- , m_p5(ParamStorageTraits<P5>::wrap(p5))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2), ParamStorageTraits<P3>::unwrap(m_p3), ParamStorageTraits<P4>::unwrap(m_p4), ParamStorageTraits<P5>::unwrap(m_p5));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
- typename ParamStorageTraits<P2>::StorageType m_p2;
- typename ParamStorageTraits<P3>::StorageType m_p3;
- typename ParamStorageTraits<P4>::StorageType m_p4;
- typename ParamStorageTraits<P5>::StorageType m_p5;
-};
-
-template<typename FunctionWrapper, typename R, typename P1, typename P2, typename P3, typename P4, typename P5, typename P6>
-class BoundFunctionImpl<FunctionWrapper, R (P1, P2, P3, P4, P5, P6)> : public FunctionImpl<typename FunctionWrapper::ResultType ()> {
-public:
- BoundFunctionImpl(FunctionWrapper functionWrapper, const P1& p1, const P2& p2, const P3& p3, const P4& p4, const P5& p5, const P6& p6)
- : m_functionWrapper(functionWrapper)
- , m_p1(ParamStorageTraits<P1>::wrap(p1))
- , m_p2(ParamStorageTraits<P2>::wrap(p2))
- , m_p3(ParamStorageTraits<P3>::wrap(p3))
- , m_p4(ParamStorageTraits<P4>::wrap(p4))
- , m_p5(ParamStorageTraits<P5>::wrap(p5))
- , m_p6(ParamStorageTraits<P6>::wrap(p6))
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::ref(m_p1);
- }
-
- ~BoundFunctionImpl()
- {
- RefAndDeref<P1, FunctionWrapper::shouldRefFirstParameter>::deref(m_p1);
- }
-
- virtual typename FunctionWrapper::ResultType operator()()
- {
- return m_functionWrapper(ParamStorageTraits<P1>::unwrap(m_p1), ParamStorageTraits<P2>::unwrap(m_p2), ParamStorageTraits<P3>::unwrap(m_p3), ParamStorageTraits<P4>::unwrap(m_p4), ParamStorageTraits<P5>::unwrap(m_p5), ParamStorageTraits<P6>::unwrap(m_p6));
- }
-
-private:
- FunctionWrapper m_functionWrapper;
- typename ParamStorageTraits<P1>::StorageType m_p1;
- typename ParamStorageTraits<P2>::StorageType m_p2;
- typename ParamStorageTraits<P3>::StorageType m_p3;
- typename ParamStorageTraits<P4>::StorageType m_p4;
- typename ParamStorageTraits<P5>::StorageType m_p5;
- typename ParamStorageTraits<P6>::StorageType m_p6;
-};
-
-class FunctionBase {
-public:
- bool isNull() const
- {
- return !m_impl;
- }
-
-protected:
- FunctionBase()
- {
- }
-
- explicit FunctionBase(PassRefPtr<FunctionImplBase> impl)
- : m_impl(impl)
- {
- }
-
- template<typename FunctionType> FunctionImpl<FunctionType>* impl() const
- {
- return static_cast<FunctionImpl<FunctionType>*>(m_impl.get());
- }
-
-private:
- RefPtr<FunctionImplBase> m_impl;
-};
-
-template<typename>
-class Function;
-
-template<typename R>
-class Function<R ()> : public FunctionBase {
-public:
- Function()
- {
- }
-
- Function(PassRefPtr<FunctionImpl<R ()>> impl)
- : FunctionBase(impl)
- {
- }
-
- R operator()() const
- {
- ASSERT(!isNull());
-
- return impl<R ()>()->operator()();
- }
-
-#if OS(DARWIN) && COMPILER_SUPPORTS(BLOCKS)
- typedef void (^BlockType)();
- operator BlockType() const
- {
- // Declare a RefPtr here so we'll be sure that the underlying FunctionImpl object's
- // lifecycle is managed correctly.
- RefPtr<FunctionImpl<R ()>> functionImpl = impl<R ()>();
- BlockType block = ^{
- functionImpl->operator()();
- };
-
- // This is equivalent to:
- //
- // return [[block copy] autorelease];
- //
- // We're using manual objc_msgSend calls here because we don't want to make the entire
- // file Objective-C. It's useful to be able to implicitly convert a Function to
- // a block even in C++ code, since that allows us to do things like:
- //
- // dispatch_async(queue, bind(...));
- //
- id copiedBlock = wtfObjcMsgSend<id>((id)block, sel_registerName("copy"));
- id autoreleasedBlock = wtfObjcMsgSend<id>(copiedBlock, sel_registerName("autorelease"));
- return (BlockType)autoreleasedBlock;
- }
-#endif
-};
-
-template<typename FunctionType>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType ()>(FunctionWrapper<FunctionType>(function))));
-}
-
-template<typename FunctionType, typename A1>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1)>(FunctionWrapper<FunctionType>(function), a1)));
-}
-
-template<typename FunctionType, typename A1, typename A2>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1, const A2& a2)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1, A2)>(FunctionWrapper<FunctionType>(function), a1, a2)));
-}
-
-template<typename FunctionType, typename A1, typename A2, typename A3>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1, const A2& a2, const A3& a3)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1, A2, A3)>(FunctionWrapper<FunctionType>(function), a1, a2, a3)));
-}
-
-template<typename FunctionType, typename A1, typename A2, typename A3, typename A4>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1, const A2& a2, const A3& a3, const A4& a4)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1, A2, A3, A4)>(FunctionWrapper<FunctionType>(function), a1, a2, a3, a4)));
-}
-
-template<typename FunctionType, typename A1, typename A2, typename A3, typename A4, typename A5>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1, A2, A3, A4, A5)>(FunctionWrapper<FunctionType>(function), a1, a2, a3, a4, a5)));
-}
-
-template<typename FunctionType, typename A1, typename A2, typename A3, typename A4, typename A5, typename A6>
-Function<typename FunctionWrapper<FunctionType>::ResultType ()> bind(FunctionType function, const A1& a1, const A2& a2, const A3& a3, const A4& a4, const A5& a5, const A6& a6)
-{
- return Function<typename FunctionWrapper<FunctionType>::ResultType ()>(adoptRef(new BoundFunctionImpl<FunctionWrapper<FunctionType>, typename FunctionWrapper<FunctionType>::ResultType (A1, A2, A3, A4, A5, A6)>(FunctionWrapper<FunctionType>(function), a1, a2, a3, a4, a5, a6)));
-}
-
-}
-
-using WTF::Function;
-using WTF::bind;
-
-#endif // WTF_Functional_h
Modified: trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm (201405 => 201406)
--- trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WTF/wtf/mac/DeprecatedSymbolsUsedBySafari.mm 2016-05-25 22:56:58 UTC (rev 201406)
@@ -25,7 +25,6 @@
#include "config.h"
-#include "Functional.h"
#include "HashMap.h"
#include "HashSet.h"
#include "Lock.h"
Modified: trunk/Source/WebCore/ChangeLog (201405 => 201406)
--- trunk/Source/WebCore/ChangeLog 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WebCore/ChangeLog 2016-05-25 22:56:58 UTC (rev 201406)
@@ -1,3 +1,12 @@
+2016-05-25 Anders Carlsson <[email protected]>
+
+ Get rid of WTF/Functional.h
+ https://bugs.webkit.org/show_bug.cgi?id=158081
+
+ Reviewed by Chris Dumez.
+
+ * Modules/mediastream/MediaStreamTrack.cpp:
+
2016-05-25 Brent Fulgham <[email protected]>
[WebSockets] No infrastructure for testing secure web sockets (wss)
Modified: trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp (201405 => 201406)
--- trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp 2016-05-25 22:56:58 UTC (rev 201406)
@@ -41,7 +41,6 @@
#include "MediaTrackConstraints.h"
#include "NotImplemented.h"
#include "ScriptExecutionContext.h"
-#include <wtf/Functional.h>
#include <wtf/NeverDestroyed.h>
namespace WebCore {
Modified: trunk/Tools/ChangeLog (201405 => 201406)
--- trunk/Tools/ChangeLog 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Tools/ChangeLog 2016-05-25 22:56:58 UTC (rev 201406)
@@ -1,3 +1,33 @@
+2016-05-25 Anders Carlsson <[email protected]>
+
+ Get rid of WTF/Functional.h
+ https://bugs.webkit.org/show_bug.cgi?id=158081
+
+ Reviewed by Chris Dumez.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WTF/Functional.cpp: Removed.
+ (TestWebKitAPI::returnFortyTwo): Deleted.
+ (TestWebKitAPI::TEST): Deleted.
+ (TestWebKitAPI::multiplyByTwo): Deleted.
+ (TestWebKitAPI::multiplyByOneAndAHalf): Deleted.
+ (TestWebKitAPI::multiply): Deleted.
+ (TestWebKitAPI::subtract): Deleted.
+ (TestWebKitAPI::A::A): Deleted.
+ (TestWebKitAPI::A::f): Deleted.
+ (TestWebKitAPI::A::addF): Deleted.
+ (TestWebKitAPI::B::B): Deleted.
+ (TestWebKitAPI::B::~B): Deleted.
+ (TestWebKitAPI::B::ref): Deleted.
+ (TestWebKitAPI::B::deref): Deleted.
+ (TestWebKitAPI::B::f): Deleted.
+ (TestWebKitAPI::B::g): Deleted.
+ (TestWebKitAPI::Number::create): Deleted.
+ (TestWebKitAPI::Number::~Number): Deleted.
+ (TestWebKitAPI::Number::value): Deleted.
+ (TestWebKitAPI::Number::Number): Deleted.
+ (TestWebKitAPI::multiplyNumberByTwo): Deleted.
+
2016-05-25 Daniel Bates <[email protected]> and Brent Fulgham <[email protected]>
[WebSockets] No infrastructure for testing secure web sockets (wss)
Modified: trunk/Tools/TestWebKitAPI/CMakeLists.txt (201405 => 201406)
--- trunk/Tools/TestWebKitAPI/CMakeLists.txt 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Tools/TestWebKitAPI/CMakeLists.txt 2016-05-25 22:56:58 UTC (rev 201406)
@@ -47,7 +47,6 @@
${TESTWEBKITAPI_DIR}/Tests/WTF/Condition.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/DateMath.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/Deque.cpp
- ${TESTWEBKITAPI_DIR}/Tests/WTF/Functional.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/HashCountedSet.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/HashMap.cpp
${TESTWEBKITAPI_DIR}/Tests/WTF/HashSet.cpp
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (201405 => 201406)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2016-05-25 22:56:58 UTC (rev 201406)
@@ -260,7 +260,6 @@
7CCE7F311A411B8E00447C4C /* CheckedArithmeticOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A7A966DA140ECCC8005EF9B4 /* CheckedArithmeticOperations.cpp */; };
7CCE7F321A411B8E00447C4C /* CString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26A2C72E15E2E73C005B1A14 /* CString.cpp */; };
7CCE7F331A411B8E00447C4C /* Deque.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */; };
- 7CCE7F341A411B8E00447C4C /* Functional.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AA9E55714980A9900001A8A /* Functional.cpp */; };
7CCE7F351A411B8E00447C4C /* HashMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BCD833414857CE400EA2003 /* HashMap.cpp */; };
7CCE7F361A411B8E00447C4C /* HashSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 26B2DFF815BDE599004F691D /* HashSet.cpp */; };
7CCE7F371A411B8E00447C4C /* IntegerToStringConversion.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 266FAFD215E5775200F61D5B /* IntegerToStringConversion.cpp */; };
@@ -547,7 +546,6 @@
1A7E8B33181208DE00AEB74A /* FragmentNavigation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = FragmentNavigation.mm; sourceTree = "<group>"; };
1A7E8B351812093600AEB74A /* FragmentNavigation.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = FragmentNavigation.html; sourceTree = "<group>"; };
1A9FB6CC1CA34BE500966124 /* EarlyKVOCrash.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = EarlyKVOCrash.mm; sourceTree = "<group>"; };
- 1AA9E55714980A9900001A8A /* Functional.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Functional.cpp; sourceTree = "<group>"; };
1AAD19F51C7CE20300831E47 /* Coding.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Coding.mm; sourceTree = "<group>"; };
1ABC3DED1899BE6D004F0626 /* Navigation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = Navigation.mm; sourceTree = "<group>"; };
1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ForceRepaint.cpp; sourceTree = "<group>"; };
@@ -1351,7 +1349,6 @@
E40019301ACE9B5C001B0A2A /* BloomFilter.cpp */,
7AA021BA1AB09EA70052953F /* DateMath.cpp */,
E4A757D3178AEA5B00B5D7A4 /* Deque.cpp */,
- 1AA9E55714980A9900001A8A /* Functional.cpp */,
7A38D7E51C752D5F004F157D /* HashCountedSet.cpp */,
0BCD833414857CE400EA2003 /* HashMap.cpp */,
26B2DFF815BDE599004F691D /* HashSet.cpp */,
@@ -1839,7 +1836,6 @@
7CCE7EC01A411A7E00447C4C /* FragmentNavigation.mm in Sources */,
7CCE7EF61A411AE600447C4C /* FrameMIMETypeHTML.cpp in Sources */,
7CCE7EF71A411AE600447C4C /* FrameMIMETypePNG.cpp in Sources */,
- 7CCE7F341A411B8E00447C4C /* Functional.cpp in Sources */,
7CCE7EF81A411AE600447C4C /* Geolocation.cpp in Sources */,
7CCE7EE11A411A9A00447C4C /* GetBackingScaleFactor.mm in Sources */,
CDBFCC451A9FF45300A7B691 /* FullscreenZoomInitialFrame.mm in Sources */,
Deleted: trunk/Tools/TestWebKitAPI/Tests/WTF/Functional.cpp (201405 => 201406)
--- trunk/Tools/TestWebKitAPI/Tests/WTF/Functional.cpp 2016-05-25 22:07:17 UTC (rev 201405)
+++ trunk/Tools/TestWebKitAPI/Tests/WTF/Functional.cpp 2016-05-25 22:56:58 UTC (rev 201406)
@@ -1,218 +0,0 @@
-/*
- * Copyright (C) 2011 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <wtf/RefCounted.h>
-#include <wtf/Functional.h>
-
-namespace TestWebKitAPI {
-
-static int returnFortyTwo()
-{
- return 42;
-}
-
-TEST(FunctionalTest, Basic)
-{
- Function<int ()> emptyFunction;
- ASSERT_TRUE(emptyFunction.isNull());
-
- Function<int ()> returnFortyTwoFunction = bind(returnFortyTwo);
- ASSERT_FALSE(returnFortyTwoFunction.isNull());
- ASSERT_EQ(42, returnFortyTwoFunction());
-}
-
-static int multiplyByTwo(int n)
-{
- return n * 2;
-}
-
-static double multiplyByOneAndAHalf(double d)
-{
- return d * 1.5;
-}
-
-TEST(FunctionalTest, UnaryBind)
-{
- Function<int ()> multiplyFourByTwoFunction = bind(multiplyByTwo, 4);
- ASSERT_EQ(8, multiplyFourByTwoFunction());
-
- Function<double ()> multiplyByOneAndAHalfFunction = bind(multiplyByOneAndAHalf, 3);
- ASSERT_EQ(4.5, multiplyByOneAndAHalfFunction());
-}
-
-static int multiply(int x, int y)
-{
- return x * y;
-}
-
-static int subtract(int x, int y)
-{
- return x - y;
-}
-
-TEST(FunctionalTest, BinaryBind)
-{
- Function<int ()> multiplyFourByTwoFunction = bind(multiply, 4, 2);
- ASSERT_EQ(8, multiplyFourByTwoFunction());
-
- Function<int ()> subtractTwoFromFourFunction = bind(subtract, 4, 2);
- ASSERT_EQ(2, subtractTwoFromFourFunction());
-}
-
-class A {
-public:
- explicit A(int i)
- : m_i(i)
- {
- }
-
- int f() { return m_i; }
- int addF(int j) { return m_i + j; }
-
-private:
- int m_i;
-};
-
-TEST(FunctionalTest, MemberFunctionBind)
-{
- A a(10);
- Function<int ()> function1 = bind(&A::f, &a);
- ASSERT_EQ(10, function1());
-
- Function<int ()> function2 = bind(&A::addF, &a, 15);
- ASSERT_EQ(25, function2());
-}
-
-class B {
-public:
- B()
- : m_numRefCalls(0)
- , m_numDerefCalls(0)
- {
- }
-
- ~B()
- {
- }
-
- void ref()
- {
- m_numRefCalls++;
- }
-
- void deref()
- {
- m_numDerefCalls++;
- }
-
- void f() { ASSERT_GT(m_numRefCalls, 0); }
- void g(int) { ASSERT_GT(m_numRefCalls, 0); }
-
- int m_numRefCalls;
- int m_numDerefCalls;
-};
-
-TEST(FunctionalTest, MemberFunctionBindRefDeref)
-{
- B b;
-
- {
- Function<void ()> function1 = bind(&B::f, &b);
- function1();
-
- Function<void ()> function2 = bind(&B::g, &b, 10);
- function2();
- }
-
- ASSERT_TRUE(b.m_numRefCalls == b.m_numDerefCalls);
- ASSERT_GT(b.m_numRefCalls, 0);
-
-}
-
-class Number : public RefCounted<Number> {
-public:
- static PassRefPtr<Number> create(int value)
- {
- return adoptRef(new Number(value));
- }
-
- ~Number()
- {
- m_value = 0;
- }
-
- int value() const { return m_value; }
-
-private:
- explicit Number(int value)
- : m_value(value)
- {
- }
-
- int m_value;
-};
-
-static int multiplyNumberByTwo(Number* number)
-{
- return number->value() * 2;
-}
-
-TEST(FunctionalTest, RefCountedStorage)
-{
- RefPtr<Number> five = Number::create(5);
- Function<int ()> multiplyFiveByTwoFunction = bind(multiplyNumberByTwo, five);
- ASSERT_EQ(10, multiplyFiveByTwoFunction());
-
- Function<int ()> multiplyFourByTwoFunction = bind(multiplyNumberByTwo, Number::create(4));
- ASSERT_EQ(8, multiplyFourByTwoFunction());
-
- RefPtr<Number> six = Number::create(6);
- Function<int ()> multiplySixByTwoFunction = bind(multiplyNumberByTwo, six.release());
- ASSERT_FALSE(six);
- ASSERT_EQ(12, multiplySixByTwoFunction());
-}
-
-namespace RefAndDerefTests {
-
- template<typename T> struct RefCounted {
- void ref();
- void deref();
- };
- struct Connection : RefCounted<Connection> { };
- COMPILE_ASSERT(WTF::HasRefAndDeref<Connection>::value, class_has_ref_and_deref);
-
- struct NoRefOrDeref { };
- COMPILE_ASSERT(!WTF::HasRefAndDeref<NoRefOrDeref>::value, class_has_no_ref_or_deref);
-
- struct RefOnly { void ref(); };
- COMPILE_ASSERT(!WTF::HasRefAndDeref<RefOnly>::value, class_has_ref_only);
-
- struct DerefOnly { void deref(); };
- COMPILE_ASSERT(!WTF::HasRefAndDeref<DerefOnly>::value, class_has_deref_only);
-
-}
-
-} // namespace TestWebKitAPI
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
