Modified: trunk/Source/WebCore/platform/Timer.h (161768 => 161769)
--- trunk/Source/WebCore/platform/Timer.h 2014-01-11 18:19:04 UTC (rev 161768)
+++ trunk/Source/WebCore/platform/Timer.h 2014-01-11 19:16:14 UTC (rev 161769)
@@ -26,6 +26,7 @@
#ifndef Timer_h
#define Timer_h
+#include <functional>
#include <wtf/Noncopyable.h>
#include <wtf/Threading.h>
#include <wtf/Vector.h>
@@ -113,34 +114,23 @@
typedef void (TimerFiredClass::*TimerFiredFunction)(Timer&);
typedef void (TimerFiredClass::*DeprecatedTimerFiredFunction)(Timer*);
- Timer(TimerFiredClass* object, TimerFiredFunction function)
- : m_object(object)
- , m_deprecatedFunction(nullptr)
- , m_function(function)
+ Timer(TimerFiredClass* object , TimerFiredFunction function)
+ : m_function(std::bind(function, object, std::ref(*this)))
{
}
Timer(TimerFiredClass* object, DeprecatedTimerFiredFunction function)
- : m_object(object)
- , m_deprecatedFunction(function)
- , m_function(nullptr)
+ : m_function(std::bind(function, object, this))
{
}
private:
virtual void fired() OVERRIDE
{
- if (m_deprecatedFunction) {
- (m_object->*m_deprecatedFunction)(this);
- return;
- }
-
- (m_object->*m_function)(*this);
+ m_function();
}
- TimerFiredClass* m_object;
- DeprecatedTimerFiredFunction m_deprecatedFunction;
- TimerFiredFunction m_function;
+ std::function<void ()> m_function;
};
inline bool TimerBase::isActive() const
Modified: trunk/Source/WebKit2/Configurations/WebKit2.xcconfig (161768 => 161769)
--- trunk/Source/WebKit2/Configurations/WebKit2.xcconfig 2014-01-11 18:19:04 UTC (rev 161768)
+++ trunk/Source/WebKit2/Configurations/WebKit2.xcconfig 2014-01-11 19:16:14 UTC (rev 161769)
@@ -32,7 +32,7 @@
FRAMEWORK_AND_LIBRARY_LDFLAGS = -framework ApplicationServices -framework Carbon -framework Cocoa -framework CoreServices -framework IOKit -framework _javascript_Core -licucore -framework QuartzCore -framework WebCore -framework CoreAudio -framework IOSurface;
// Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols.
-UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol, -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED1Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_;
+UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol, -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED1Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol, -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol, -Wl,__ZTVNSt3__117bad_function_callE;
OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) $(OTHER_LDFLAGS_$(PLATFORM_NAME));
OTHER_LDFLAGS_macosx = $(FRAMEWORK_AND_LIBRARY_LDFLAGS);