Unreviewed, rolling out r201663.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Jun 2016 00:56:57 +0000 (00:56 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 4 Jun 2016 00:56:57 +0000 (00:56 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158374

Broke the Windows build (Requested by andersca on #webkit).

Reverted changeset:

"Rename NoncopyableFunction to Function"
https://bugs.webkit.org/show_bug.cgi?id=158354
http://trac.webkit.org/changeset/201663

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201673 268f45cc-cd09-0410-ab3c-d52691b4dbfc

56 files changed:
Source/WTF/ChangeLog
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/CrossThreadTask.h
Source/WTF/wtf/FunctionDispatcher.h
Source/WTF/wtf/MainThread.cpp
Source/WTF/wtf/MainThread.h
Source/WTF/wtf/NoncopyableFunction.h [moved from Source/WTF/wtf/Function.h with 90% similarity]
Source/WTF/wtf/RunLoop.cpp
Source/WTF/wtf/RunLoop.h
Source/WTF/wtf/WorkQueue.h
Source/WTF/wtf/cocoa/WorkQueueCocoa.cpp
Source/WTF/wtf/efl/DispatchQueueWorkItemEfl.h
Source/WTF/wtf/efl/WorkQueueEfl.cpp
Source/WTF/wtf/generic/RunLoopGeneric.cpp
Source/WTF/wtf/generic/WorkQueueGeneric.cpp
Source/WTF/wtf/glib/RunLoopGLib.cpp
Source/WTF/wtf/win/WorkItemWin.cpp
Source/WTF/wtf/win/WorkItemWin.h
Source/WTF/wtf/win/WorkQueueWin.cpp
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.cpp
Source/WebCore/Modules/mediastream/MediaEndpointPeerConnection.h
Source/WebCore/Modules/webaudio/AudioDestinationNode.h
Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.cpp
Source/WebCore/Modules/webaudio/DefaultAudioDestinationNode.h
Source/WebCore/dom/ActiveDOMCallbackMicrotask.cpp
Source/WebCore/dom/ActiveDOMCallbackMicrotask.h
Source/WebCore/dom/ScriptExecutionContext.h
Source/WebCore/fileapi/AsyncFileStream.cpp
Source/WebCore/fileapi/AsyncFileStream.h
Source/WebCore/page/FrameView.cpp
Source/WebCore/page/FrameView.h
Source/WebCore/page/scrolling/ScrollingThread.cpp
Source/WebCore/page/scrolling/ScrollingThread.h
Source/WebCore/platform/GenericTaskQueue.cpp
Source/WebCore/platform/GenericTaskQueue.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm
Source/WebCore/platform/mediastream/MediaStreamPrivate.cpp
Source/WebCore/platform/mediastream/MediaStreamPrivate.h
Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.h
Source/WebCore/platform/mediastream/mac/AVMediaCaptureSource.mm
Source/WebCore/style/StyleTreeResolver.cpp
Source/WebCore/style/StyleTreeResolver.h
Source/WebKit/ChangeLog
Source/WebKit/Storage/StorageSyncManager.cpp
Source/WebKit/Storage/StorageSyncManager.h
Source/WebKit/Storage/StorageThread.cpp
Source/WebKit/Storage/StorageThread.h
Source/WebKit2/ChangeLog
Source/WebKit2/NetworkProcess/NetworkProcess.cpp
Source/WebKit2/NetworkProcess/NetworkProcess.h
Source/WebKit2/NetworkProcess/cache/NetworkCache.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCache.h
Source/WebKit2/NetworkProcess/cache/NetworkCacheIOChannelSoup.cpp
Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h

index 24de96f..d06ef9a 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-03  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r201663.
+        https://bugs.webkit.org/show_bug.cgi?id=158374
+
+        Broke the Windows build (Requested by andersca on #webkit).
+
+        Reverted changeset:
+
+        "Rename NoncopyableFunction to Function"
+        https://bugs.webkit.org/show_bug.cgi?id=158354
+        http://trac.webkit.org/changeset/201663
+
 2016-06-03  Anders Carlsson  <andersca@apple.com>
 
         Rename NoncopyableFunction to Function
index 118e18c..06630f0 100644 (file)
                7E29C33E15FFD79B00516D61 /* ObjcRuntimeExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */; };
                8134013815B092FD001FF0B8 /* Base64.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8134013615B092FD001FF0B8 /* Base64.cpp */; };
                8134013915B092FD001FF0B8 /* Base64.h in Headers */ = {isa = PBXBuildFile; fileRef = 8134013715B092FD001FF0B8 /* Base64.h */; };
-               83F2BADF1CF9524E003E99C3 /* Function.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F2BADE1CF9524E003E99C3 /* Function.h */; };
+               83F2BADF1CF9524E003E99C3 /* NoncopyableFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 83F2BADE1CF9524E003E99C3 /* NoncopyableFunction.h */; };
                83FBA93219DF459700F30ADB /* TypeCasts.h in Headers */ = {isa = PBXBuildFile; fileRef = 83FBA93119DF459700F30ADB /* TypeCasts.h */; };
                86F46F611A2840EE00CCBF22 /* RefCounter.h in Headers */ = {isa = PBXBuildFile; fileRef = 86F46F5F1A2840EE00CCBF22 /* RefCounter.h */; };
                93934BD318A1E8C300D0D6A1 /* StringViewObjC.mm in Sources */ = {isa = PBXBuildFile; fileRef = 93934BD218A1E8C300D0D6A1 /* StringViewObjC.mm */; };
                7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ObjcRuntimeExtras.h; sourceTree = "<group>"; };
                8134013615B092FD001FF0B8 /* Base64.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base64.cpp; sourceTree = "<group>"; };
                8134013715B092FD001FF0B8 /* Base64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base64.h; sourceTree = "<group>"; };
-               83F2BADE1CF9524E003E99C3 /* Function.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Function.h; sourceTree = "<group>"; };
+               83F2BADE1CF9524E003E99C3 /* NoncopyableFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NoncopyableFunction.h; sourceTree = "<group>"; };
                83FBA93119DF459700F30ADB /* TypeCasts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeCasts.h; sourceTree = "<group>"; };
                86F46F5F1A2840EE00CCBF22 /* RefCounter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RefCounter.h; sourceTree = "<group>"; };
                93934BD218A1E8C300D0D6A1 /* StringViewObjC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = StringViewObjC.mm; path = mac/StringViewObjC.mm; sourceTree = "<group>"; };
                                0F9D335C165DBA73005AD387 /* FilePrintStream.h */,
                                0F2B66A517B6B4F700A7AE3F /* FlipBytes.h */,
                                A8A472A6151A825A004123FF /* Forward.h */,
-                               83F2BADE1CF9524E003E99C3 /* Function.h */,
                                1A1D8B9D1731879800141DA4 /* FunctionDispatcher.cpp */,
                                1A1D8B9B173186CE00141DA4 /* FunctionDispatcher.h */,
                                A8A472A8151A825A004123FF /* GetPtr.h */,
                                1A3F6BE6174ADA2100B2EEA7 /* NeverDestroyed.h */,
                                0F0D85B317234CB100338210 /* NoLock.h */,
                                A8A472D0151A825B004123FF /* Noncopyable.h */,
+                               83F2BADE1CF9524E003E99C3 /* NoncopyableFunction.h */,
                                A8A472D5151A825B004123FF /* NumberOfCores.cpp */,
                                A8A472D6151A825B004123FF /* NumberOfCores.h */,
                                7E29C33D15FFD79B00516D61 /* ObjcRuntimeExtras.h */,
                                A8A473D9151A825B004123FF /* HashTable.h in Headers */,
                                A8A473DA151A825B004123FF /* HashTraits.h in Headers */,
                                A8A473DB151A825B004123FF /* HexNumber.h in Headers */,
-                               83F2BADF1CF9524E003E99C3 /* Function.h in Headers */,
+                               83F2BADF1CF9524E003E99C3 /* NoncopyableFunction.h in Headers */,
                                2684D4361C000D400081D663 /* IndexSparseSet.h in Headers */,
                                A8A473DC151A825B004123FF /* InlineASM.h in Headers */,
                                A70DA0841799F04D00529A9B /* Insertion.h in Headers */,
index d69e30a..1a16e3a 100644 (file)
@@ -26,7 +26,7 @@
 #pragma once
 
 #include <wtf/CrossThreadCopier.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/StdLibExtras.h>
 
 namespace WTF {
@@ -35,7 +35,7 @@ class CrossThreadTask {
 public:
     CrossThreadTask() = default;
 
-    CrossThreadTask(Function<void ()>&& taskFunction)
+    CrossThreadTask(NoncopyableFunction<void ()>&& taskFunction)
         : m_taskFunction(WTFMove(taskFunction))
     {
         ASSERT(taskFunction);
@@ -47,7 +47,7 @@ public:
     }
 
 protected:
-    Function<void ()> m_taskFunction;
+    NoncopyableFunction<void ()> m_taskFunction;
 };
 
 template <typename T, typename... Arguments>
index 344a160..b52eecf 100644 (file)
@@ -27,7 +27,7 @@
 #define FunctionDispatcher_h
 
 #include <functional>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/ThreadSafeRefCounted.h>
 
 namespace WTF {
@@ -39,7 +39,7 @@ class FunctionDispatcher : public ThreadSafeRefCounted<FunctionDispatcher> {
 public:
     WTF_EXPORT_PRIVATE virtual ~FunctionDispatcher();
 
-    virtual void dispatch(Function<void ()>&&) = 0;
+    virtual void dispatch(NoncopyableFunction<void ()>&&) = 0;
 
 protected:
     WTF_EXPORT_PRIVATE FunctionDispatcher();
index 6d42c4f..bd11e10 100644 (file)
@@ -47,9 +47,9 @@ static ThreadIdentifier mainThreadIdentifier;
 
 static StaticLock mainThreadFunctionQueueMutex;
 
-static Deque<Function<void ()>>& functionQueue()
+static Deque<NoncopyableFunction<void ()>>& functionQueue()
 {
-    static NeverDestroyed<Deque<Function<void ()>>> functionQueue;
+    static NeverDestroyed<Deque<NoncopyableFunction<void ()>>> functionQueue;
     return functionQueue;
 }
 
@@ -120,7 +120,7 @@ void dispatchFunctionsFromMainThread()
 
     auto startTime = std::chrono::steady_clock::now();
 
-    Function<void ()> function;
+    NoncopyableFunction<void ()> function;
 
     while (true) {
         {
@@ -144,7 +144,7 @@ void dispatchFunctionsFromMainThread()
     }
 }
 
-void callOnMainThread(Function<void ()>&& function)
+void callOnMainThread(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(function);
 
index 94c70c6..f19f559 100644 (file)
@@ -32,7 +32,7 @@
 
 #include <functional>
 #include <stdint.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace WTF {
 
@@ -41,7 +41,7 @@ typedef uint32_t ThreadIdentifier;
 // Must be called from the main thread.
 WTF_EXPORT_PRIVATE void initializeMainThread();
 
-WTF_EXPORT_PRIVATE void callOnMainThread(Function<void ()>&&);
+WTF_EXPORT_PRIVATE void callOnMainThread(NoncopyableFunction<void ()>&&);
 
 #if PLATFORM(COCOA)
 WTF_EXPORT_PRIVATE void callOnWebThreadOrDispatchAsyncOnMainThread(void (^block)());
similarity index 90%
rename from Source/WTF/wtf/Function.h
rename to Source/WTF/wtf/NoncopyableFunction.h
index 5d2b2db..ab9f4dc 100644 (file)
 
 namespace WTF {
 
-template<typename> class Function;
+template<typename> class NoncopyableFunction;
 
 template <typename Out, typename... In>
-class Function<Out(In...)> {
+class NoncopyableFunction<Out(In...)> {
 public:
-    Function() = default;
+    NoncopyableFunction() = default;
 
     template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
-    Function(CallableType&& callable)
+    NoncopyableFunction(CallableType&& callable)
         : m_callableWrapper(std::make_unique<CallableWrapper<CallableType>>(WTFMove(callable)))
     {
     }
@@ -53,13 +53,13 @@ public:
     explicit operator bool() const { return !!m_callableWrapper; }
 
     template<typename CallableType, class = typename std::enable_if<std::is_rvalue_reference<CallableType&&>::value>::type>
-    Function& operator=(CallableType&& callable)
+    NoncopyableFunction& operator=(CallableType&& callable)
     {
         m_callableWrapper = std::make_unique<CallableWrapper<CallableType>>(WTFMove(callable));
         return *this;
     }
 
-    Function& operator=(std::nullptr_t)
+    NoncopyableFunction& operator=(std::nullptr_t)
     {
         m_callableWrapper = nullptr;
         return *this;
@@ -96,4 +96,4 @@ private:
 
 } // namespace WTF
 
-using WTF::Function;
+using WTF::NoncopyableFunction;
index 3b0267e..9660f15 100644 (file)
@@ -91,7 +91,7 @@ void RunLoop::performWork()
 
     size_t functionsToHandle = 0;
     {
-        Function<void ()> function;
+        NoncopyableFunction<void ()> function;
         {
             MutexLocker locker(m_functionQueueLock);
             functionsToHandle = m_functionQueue.size();
@@ -106,7 +106,7 @@ void RunLoop::performWork()
     }
 
     for (size_t functionsHandled = 1; functionsHandled < functionsToHandle; ++functionsHandled) {
-        Function<void ()> function;
+        NoncopyableFunction<void ()> function;
         {
             MutexLocker locker(m_functionQueueLock);
 
@@ -123,7 +123,7 @@ void RunLoop::performWork()
     }
 }
 
-void RunLoop::dispatch(Function<void ()>&& function)
+void RunLoop::dispatch(NoncopyableFunction<void ()>&& function)
 {
     {
         MutexLocker locker(m_functionQueueLock);
index 3611d7a..e1558b6 100644 (file)
@@ -59,7 +59,7 @@ public:
     WTF_EXPORT_PRIVATE static bool isMain();
     ~RunLoop();
 
-    void dispatch(Function<void ()>&&) override;
+    void dispatch(NoncopyableFunction<void ()>&&) override;
 
     WTF_EXPORT_PRIVATE static void run();
     WTF_EXPORT_PRIVATE void stop();
@@ -79,7 +79,7 @@ public:
 #endif
 
 #if USE(GLIB_EVENT_LOOP) || USE(GENERIC_EVENT_LOOP)
-    WTF_EXPORT_PRIVATE void dispatchAfter(std::chrono::nanoseconds, Function<void ()>&&);
+    WTF_EXPORT_PRIVATE void dispatchAfter(std::chrono::nanoseconds, NoncopyableFunction<void ()>&&);
 #endif
 
     class TimerBase {
@@ -155,7 +155,7 @@ private:
     void performWork();
 
     Mutex m_functionQueueLock;
-    Deque<Function<void ()>> m_functionQueue;
+    Deque<NoncopyableFunction<void ()>> m_functionQueue;
 
 #if USE(WINDOWS_EVENT_LOOP)
     static bool registerRunLoopMessageWindowClass();
index c96aa2d..e553259 100644 (file)
@@ -72,8 +72,8 @@ public:
     WTF_EXPORT_PRIVATE static Ref<WorkQueue> create(const char* name, Type = Type::Serial, QOS = QOS::Default);
     virtual ~WorkQueue();
 
-    WTF_EXPORT_PRIVATE void dispatch(Function<void ()>&&) override;
-    WTF_EXPORT_PRIVATE void dispatchAfter(std::chrono::nanoseconds, Function<void ()>&&);
+    WTF_EXPORT_PRIVATE void dispatch(NoncopyableFunction<void ()>&&) override;
+    WTF_EXPORT_PRIVATE void dispatchAfter(std::chrono::nanoseconds, NoncopyableFunction<void ()>&&);
 
     WTF_EXPORT_PRIVATE static void concurrentApply(size_t iterations, const std::function<void (size_t index)>&);
 
index fdbef73..995a954 100644 (file)
 
 namespace WTF {
 
-void WorkQueue::dispatch(Function<void ()>&& function)
+void WorkQueue::dispatch(NoncopyableFunction<void ()>&& function)
 {
     ref();
-    auto* functionPtr = new Function<void ()>(WTFMove(function));
+    auto* functionPtr = new NoncopyableFunction<void ()>(WTFMove(function));
     dispatch_async(m_dispatchQueue, ^{
         (*functionPtr)();
         delete functionPtr;
@@ -39,10 +39,10 @@ void WorkQueue::dispatch(Function<void ()>&& function)
     });
 }
 
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, Function<void ()>&& function)
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, NoncopyableFunction<void ()>&& function)
 {
     ref();
-    auto* functionPtr = new Function<void ()>(WTFMove(function));
+    auto* functionPtr = new NoncopyableFunction<void ()>(WTFMove(function));
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, duration.count()), m_dispatchQueue, ^{
         (*functionPtr)();
         delete functionPtr;
index 162bab4..3ddfe57 100644 (file)
@@ -34,7 +34,7 @@
 
 class WorkItem {
 public:
-    WorkItem(Ref<WorkQueue>&& workQueue, Function<void ()>&& function)
+    WorkItem(Ref<WorkQueue>&& workQueue, NoncopyableFunction<void ()>&& function)
         : m_workQueue(WTFMove(workQueue))
         , m_function(WTFMove(function))
     {
@@ -44,12 +44,12 @@ public:
 
 private:
     Ref<WorkQueue> m_workQueue;
-    Function<void ()> m_function;
+    NoncopyableFunction<void ()> m_function;
 };
 
 class TimerWorkItem : public WorkItem {
 public:
-    static std::unique_ptr<TimerWorkItem> create(Ref<WorkQueue>&& workQueue, Function<void ()>&& function, std::chrono::nanoseconds delayNanoSeconds)
+    static std::unique_ptr<TimerWorkItem> create(Ref<WorkQueue>&& workQueue, NoncopyableFunction<void ()>&& function, std::chrono::nanoseconds delayNanoSeconds)
     {
         ASSERT(delayNanoSeconds.count() >= 0);
         return std::unique_ptr<TimerWorkItem>(new TimerWorkItem(WTFMove(workQueue), WTFMove(function), monotonicallyIncreasingTime() * 1000000000.0 + delayNanoSeconds.count()));
@@ -58,7 +58,7 @@ public:
     bool hasExpired(double currentTimeNanoSeconds) const { return currentTimeNanoSeconds >= m_expirationTimeNanoSeconds; }
 
 protected:
-    TimerWorkItem(Ref<WorkQueue>&& workQueue, Function<void ()>&& function, double expirationTimeNanoSeconds)
+    TimerWorkItem(Ref<WorkQueue>&& workQueue, NoncopyableFunction<void ()>&& function, double expirationTimeNanoSeconds)
         : WorkItem(WTFMove(workQueue), WTFMove(function))
         , m_expirationTimeNanoSeconds(expirationTimeNanoSeconds)
     {
index da913bf..40d1939 100644 (file)
@@ -54,7 +54,7 @@ void WorkQueue::unregisterSocketEventHandler(int fileDescriptor)
     m_dispatchQueue->clearSocketEventHandler();
 }
 
-void WorkQueue::dispatch(Function<void ()>&& function)
+void WorkQueue::dispatch(NoncopyableFunction<void ()>&& function)
 {
     if (!m_dispatchQueue)
         return;
@@ -62,7 +62,7 @@ void WorkQueue::dispatch(Function<void ()>&& function)
     m_dispatchQueue->dispatch(std::make_unique<WorkItem>(*this, WTFMove(function)));
 }
 
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, Function<void ()>&& function)
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, NoncopyableFunction<void ()>&& function)
 {
     if (!m_dispatchQueue)
         return;
index 25ae6f1..171ad30 100644 (file)
@@ -32,12 +32,12 @@ namespace WTF {
 class RunLoop::TimerBase::ScheduledTask : public ThreadSafeRefCounted<ScheduledTask> {
 WTF_MAKE_NONCOPYABLE(ScheduledTask);
 public:
-    static RefPtr<ScheduledTask> create(Function<void ()>&& function, double interval, bool repeating)
+    static RefPtr<ScheduledTask> create(NoncopyableFunction<void ()>&& function, double interval, bool repeating)
     {
         return adoptRef(new ScheduledTask(WTFMove(function), interval, repeating));
     }
 
-    ScheduledTask(Function<void ()>&& function, double interval, bool repeating)
+    ScheduledTask(NoncopyableFunction<void ()>&& function, double interval, bool repeating)
         : m_function(WTFMove(function))
         , m_fireInterval(std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::duration<double>(interval)))
         , m_isRepeating(repeating)
@@ -90,7 +90,7 @@ public:
     }
 
 private:
-    Function<void ()> m_function;
+    NoncopyableFunction<void ()> m_function;
     Condition::Clock::time_point m_scheduledTimePoint;
     std::chrono::microseconds m_fireInterval;
     std::atomic<bool> m_isActive { true };
@@ -237,7 +237,7 @@ void RunLoop::scheduleAndWakeUp(RefPtr<TimerBase::ScheduledTask> task)
     wakeUp(locker);
 }
 
-void RunLoop::dispatchAfter(std::chrono::nanoseconds delay, Function<void ()>&& function)
+void RunLoop::dispatchAfter(std::chrono::nanoseconds delay, NoncopyableFunction<void ()>&& function)
 {
     LockHolder locker(m_loopLock);
     bool repeating = false;
index 5c7b9b7..7f80e69 100644 (file)
@@ -81,7 +81,7 @@ void WorkQueue::platformInvalidate()
     }
 }
 
-void WorkQueue::dispatch(Function<void ()>&& function)
+void WorkQueue::dispatch(NoncopyableFunction<void ()>&& function)
 {
     RefPtr<WorkQueue> protect(this);
     m_runLoop->dispatch([protect, function = WTFMove(function)] {
@@ -89,7 +89,7 @@ void WorkQueue::dispatch(Function<void ()>&& function)
     });
 }
 
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds delay, Function<void ()>&& function)
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds delay, NoncopyableFunction<void ()>&& function)
 {
     RefPtr<WorkQueue> protect(this);
     m_runLoop->dispatchAfter(delay, [protect, function = WTFMove(function)] {
index 927ce32..89b7f70 100644 (file)
@@ -124,7 +124,7 @@ void RunLoop::wakeUp()
 class DispatchAfterContext {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    DispatchAfterContext(Function<void ()>&& function)
+    DispatchAfterContext(NoncopyableFunction<void ()>&& function)
         : m_function(WTFMove(function))
     {
     }
@@ -135,10 +135,10 @@ public:
     }
 
 private:
-    Function<void ()> m_function;
+    NoncopyableFunction<void ()> m_function;
 };
 
-void RunLoop::dispatchAfter(std::chrono::nanoseconds duration, Function<void ()>&& function)
+void RunLoop::dispatchAfter(std::chrono::nanoseconds duration, NoncopyableFunction<void ()>&& function)
 {
     GRefPtr<GSource> source = adoptGRef(g_timeout_source_new(std::chrono::duration_cast<std::chrono::milliseconds>(duration).count()));
     g_source_set_name(source.get(), "[WebKit] RunLoop dispatchAfter");
index 7b73090..8642322 100644 (file)
 
 namespace WTF {
 
-WorkItemWin::WorkItemWin(Function<void ()>&& function, WorkQueue* queue)
+WorkItemWin::WorkItemWin(NoncopyableFunction<void ()>&& function, WorkQueue* queue)
     : m_function(WTFMove(function))
     , m_queue(queue)
 {
 }
 
-RefPtr<WorkItemWin> WorkItemWin::create(Function<void ()>&& function, WorkQueue* queue)
+RefPtr<WorkItemWin> WorkItemWin::create(NoncopyableFunction<void ()>&& function, WorkQueue* queue)
 {
     return adoptRef(new WorkItemWin(WTFMove(function), queue));
 }
@@ -47,7 +47,7 @@ WorkItemWin::~WorkItemWin()
 {
 }
 
-HandleWorkItem::HandleWorkItem(HANDLE handle, Function<void ()>&& function, WorkQueue* queue)
+HandleWorkItem::HandleWorkItem(HANDLE handle, NoncopyableFunction<void ()>&& function, WorkQueue* queue)
     : WorkItemWin(WTFMove(function), queue)
     , m_handle(handle)
     , m_waitHandle(0)
@@ -55,7 +55,7 @@ HandleWorkItem::HandleWorkItem(HANDLE handle, Function<void ()>&& function, Work
     ASSERT_ARG(handle, handle);
 }
 
-RefPtr<HandleWorkItem> HandleWorkItem::createByAdoptingHandle(HANDLE handle, Function<void ()>&& function, WorkQueue* queue)
+RefPtr<HandleWorkItem> HandleWorkItem::createByAdoptingHandle(HANDLE handle, NoncopyableFunction<void ()>&& function, WorkQueue* queue)
 {
     return adoptRef(new HandleWorkItem(handle, WTFMove(function), queue));
 }
index 24ee265..baa77d9 100644 (file)
@@ -39,30 +39,30 @@ class WorkQueue;
 
 class WorkItemWin : public ThreadSafeRefCounted<WorkItemWin> {
 public:
-    static RefPtr<WorkItemWin> create(Function<void ()>&&, WorkQueue*);
+    static RefPtr<WorkItemWin> create(NoncopyableFunction<void ()>&&, WorkQueue*);
     virtual ~WorkItemWin();
 
-    Function<void ()>& function() { return m_function; }
+    NoncopyableFunction<void ()>& function() { return m_function; }
     WorkQueue* queue() const { return m_queue.get(); }
 
 protected:
-    WorkItemWin(Function<void ()>&&, WorkQueue*);
+    WorkItemWin(NoncopyableFunction<void ()>&&, WorkQueue*);
 
 private:
-    Function<void ()> m_function;
+    NoncopyableFunction<void ()> m_function;
     RefPtr<WorkQueue> m_queue;
 };
 
 class HandleWorkItem : public WorkItemWin {
 public:
-    static RefPtr<HandleWorkItem> createByAdoptingHandle(HANDLE, Function<void ()>&&, WorkQueue*);
+    static RefPtr<HandleWorkItem> createByAdoptingHandle(HANDLE, NoncopyableFunction<void ()>&&, WorkQueue*);
     virtual ~HandleWorkItem();
 
     void setWaitHandle(HANDLE waitHandle) { m_waitHandle = waitHandle; }
     HANDLE waitHandle() const { return m_waitHandle; }
 
 private:
-    HandleWorkItem(HANDLE, Function<void ()>&&, WorkQueue*);
+    HandleWorkItem(HANDLE, NoncopyableFunction<void ()>&&, WorkQueue*);
 
     HANDLE m_handle;
     HANDLE m_waitHandle;
index 855c429..e452981 100644 (file)
@@ -129,7 +129,7 @@ void WorkQueue::platformInvalidate()
     ::DeleteTimerQueueEx(m_timerQueue, 0);
 }
 
-void WorkQueue::dispatch(Function<void ()>&& function)
+void WorkQueue::dispatch(NoncopyableFunction<void ()>&& function)
 {
     MutexLocker locker(m_workItemQueueLock);
     ref();
@@ -149,7 +149,7 @@ struct TimerContext : public ThreadSafeRefCounted<TimerContext> {
     static RefPtr<TimerContext> create() { return adoptRef(new TimerContext); }
 
     WorkQueue* queue;
-    Function<void ()> function;
+    NoncopyableFunction<void ()> function;
     Mutex timerMutex;
     HANDLE timer;
 
@@ -180,7 +180,7 @@ void WorkQueue::timerCallback(void* context, BOOLEAN timerOrWaitFired)
     }
 }
 
-void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, Function<void ()>&& function)
+void WorkQueue::dispatchAfter(std::chrono::nanoseconds duration, NoncopyableFunction<void ()>&& function)
 {
     ASSERT(m_timerQueue);
     ref();
index 8540ab6..d843bb8 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-03  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r201663.
+        https://bugs.webkit.org/show_bug.cgi?id=158374
+
+        Broke the Windows build (Requested by andersca on #webkit).
+
+        Reverted changeset:
+
+        "Rename NoncopyableFunction to Function"
+        https://bugs.webkit.org/show_bug.cgi?id=158354
+        http://trac.webkit.org/changeset/201663
+
 2016-06-03  Ryosuke Niwa  <rniwa@webkit.org>
 
         Crash under VisibleSelection::firstRange()
index 8f0eaab..9668f30 100644 (file)
@@ -95,7 +95,7 @@ MediaEndpointPeerConnection::MediaEndpointPeerConnection(PeerConnectionBackendCl
     m_mediaEndpoint->generateDtlsInfo();
 }
 
-void MediaEndpointPeerConnection::runTask(Function<void ()>&& task)
+void MediaEndpointPeerConnection::runTask(NoncopyableFunction<void ()>&& task)
 {
     if (m_dtlsFingerprint.isNull()) {
         // Only one task needs to be deferred since it will hold off any others until completed.
index ffb64f1..f2582fb 100644 (file)
@@ -37,7 +37,7 @@
 #include "NotImplemented.h"
 #include "PeerConnectionBackend.h"
 #include "RTCSessionDescription.h"
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
@@ -79,7 +79,7 @@ public:
     void clearNegotiationNeededState() override { notImplemented(); };
 
 private:
-    void runTask(Function<void ()>&&);
+    void runTask(NoncopyableFunction<void ()>&&);
     void startRunningTasks();
 
     void createOfferTask(RTCOfferOptions&, PeerConnection::SessionDescriptionPromise&);
@@ -93,7 +93,7 @@ private:
     PeerConnectionBackendClient* m_client;
     std::unique_ptr<MediaEndpoint> m_mediaEndpoint;
 
-    Function<void ()> m_initialDeferredTask;
+    NoncopyableFunction<void ()> m_initialDeferredTask;
 
     std::unique_ptr<SDPProcessor> m_sdpProcessor;
 
index 88a7f71..cfe8f15 100644 (file)
@@ -30,7 +30,7 @@
 #include "AudioIOCallback.h"
 #include "AudioNode.h"
 #include "AudioSourceProvider.h"
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace WebCore {
 
@@ -59,9 +59,9 @@ public:
     virtual void enableInput(const String& inputDeviceId) = 0;
 
     virtual void startRendering() = 0;
-    virtual void resume(Function<void ()>&&) { }
-    virtual void suspend(Function<void ()>&&) { }
-    virtual void close(Function<void ()>&&) { }
+    virtual void resume(NoncopyableFunction<void ()>&&) { }
+    virtual void suspend(NoncopyableFunction<void ()>&&) { }
+    virtual void close(NoncopyableFunction<void ()>&&) { }
 
     virtual bool isPlaying() { return false; }
     void isPlayingDidChange() override;
index 7ceccba..ac1371e 100644 (file)
@@ -106,7 +106,7 @@ void DefaultAudioDestinationNode::startRendering()
         m_destination->start();
 }
 
-void DefaultAudioDestinationNode::resume(Function<void ()>&& function)
+void DefaultAudioDestinationNode::resume(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(isInitialized());
     if (isInitialized())
@@ -115,7 +115,7 @@ void DefaultAudioDestinationNode::resume(Function<void ()>&& function)
         scriptExecutionContext->postTask(WTFMove(function));
 }
 
-void DefaultAudioDestinationNode::suspend(Function<void ()>&& function)
+void DefaultAudioDestinationNode::suspend(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(isInitialized());
     if (isInitialized())
@@ -124,7 +124,7 @@ void DefaultAudioDestinationNode::suspend(Function<void ()>&& function)
         scriptExecutionContext->postTask(WTFMove(function));
 }
 
-void DefaultAudioDestinationNode::close(Function<void()>&& function)
+void DefaultAudioDestinationNode::close(NoncopyableFunction<void()>&& function)
 {
     ASSERT(isInitialized());
     uninitialize();
index 35a0df1..09c9b38 100644 (file)
@@ -50,9 +50,9 @@ public:
     // AudioDestinationNode
     void enableInput(const String& inputDeviceId) override;
     void startRendering() override;
-    void resume(Function<void ()>&&) override;
-    void suspend(Function<void ()>&&) override;
-    void close(Function<void ()>&&) override;
+    void resume(NoncopyableFunction<void ()>&&) override;
+    void suspend(NoncopyableFunction<void ()>&&) override;
+    void close(NoncopyableFunction<void ()>&&) override;
     unsigned long maxChannelCount() const override;
     bool isPlaying() override;
 
index 66f590a..7aa2269 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace WebCore {
 
-ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask(MicrotaskQueue& queue, ScriptExecutionContext& scriptExecutionContext, Function<void()>&& task)
+ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask(MicrotaskQueue& queue, ScriptExecutionContext& scriptExecutionContext, NoncopyableFunction<void()>&& task)
     : ActiveDOMCallback(&scriptExecutionContext)
     , m_queue(queue)
     , m_task(WTFMove(task))
index 8a7f7f6..e11c4d0 100644 (file)
 
 #include "ActiveDOMCallback.h"
 #include "Microtasks.h"
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace WebCore {
 
 class ActiveDOMCallbackMicrotask final : public Microtask, public ActiveDOMCallback {
     WTF_MAKE_FAST_ALLOCATED;
 public:
-    WEBCORE_EXPORT ActiveDOMCallbackMicrotask(MicrotaskQueue&, ScriptExecutionContext&, Function<void()>&&);
+    WEBCORE_EXPORT ActiveDOMCallbackMicrotask(MicrotaskQueue&, ScriptExecutionContext&, NoncopyableFunction<void()>&&);
     WEBCORE_EXPORT virtual ~ActiveDOMCallbackMicrotask();
 
     Result run() override;
@@ -46,7 +46,7 @@ private:
     // be accessed via the ScriptExecutionContext, which should hold a reference to the relevent
     // queue.
     MicrotaskQueue& m_queue;
-    Function<void()> m_task;
+    NoncopyableFunction<void()> m_task;
 };
 
 } // namespace WebCore
index de99296..dd0ab21 100644 (file)
@@ -35,7 +35,7 @@
 #include <runtime/ConsoleTypes.h>
 #include <wtf/CrossThreadTask.h>
 #include <wtf/HashSet.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace JSC {
 class ExecState;
@@ -133,20 +133,20 @@ public:
     public:
         enum CleanupTaskTag { CleanupTask };
 
-        template<typename T, typename = typename std::enable_if<!std::is_base_of<Task, T>::value && std::is_convertible<T, Function<void (ScriptExecutionContext&)>>::value>::type>
+        template<typename T, typename = typename std::enable_if<!std::is_base_of<Task, T>::value && std::is_convertible<T, NoncopyableFunction<void (ScriptExecutionContext&)>>::value>::type>
         Task(T task)
             : m_task(WTFMove(task))
             , m_isCleanupTask(false)
         {
         }
 
-        Task(Function<void ()>&& task)
+        Task(NoncopyableFunction<void ()>&& task)
             : m_task([task = WTFMove(task)](ScriptExecutionContext&) { task(); })
             , m_isCleanupTask(false)
         {
         }
 
-        template<typename T, typename = typename std::enable_if<std::is_convertible<T, Function<void (ScriptExecutionContext&)>>::value>::type>
+        template<typename T, typename = typename std::enable_if<std::is_convertible<T, NoncopyableFunction<void (ScriptExecutionContext&)>>::value>::type>
         Task(CleanupTaskTag, T task)
             : m_task(WTFMove(task))
             , m_isCleanupTask(true)
@@ -163,7 +163,7 @@ public:
         bool isCleanupTask() const { return m_isCleanupTask; }
 
     protected:
-        Function<void (ScriptExecutionContext&)> m_task;
+        NoncopyableFunction<void (ScriptExecutionContext&)> m_task;
         bool m_isCleanupTask;
     };
 
index b3287ee..4ae6c80 100644 (file)
@@ -39,7 +39,7 @@
 #include <wtf/MainThread.h>
 #include <wtf/MessageQueue.h>
 #include <wtf/NeverDestroyed.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace WebCore {
 
@@ -64,12 +64,12 @@ inline AsyncFileStream::Internals::Internals(FileStreamClient& client)
 #endif
 }
 
-static void callOnFileThread(Function<void ()>&& function)
+static void callOnFileThread(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(isMainThread());
     ASSERT(function);
 
-    static NeverDestroyed<MessageQueue<Function<void ()>>> queue;
+    static NeverDestroyed<MessageQueue<NoncopyableFunction<void ()>>> queue;
 
     static std::once_flag createFileThreadOnce;
     std::call_once(createFileThreadOnce, [] {
@@ -90,7 +90,7 @@ static void callOnFileThread(Function<void ()>&& function)
         });
     });
 
-    queue.get().append(std::make_unique<Function<void ()>>(WTFMove(function)));
+    queue.get().append(std::make_unique<NoncopyableFunction<void ()>>(WTFMove(function)));
 }
 
 AsyncFileStream::AsyncFileStream(FileStreamClient& client)
@@ -114,7 +114,7 @@ AsyncFileStream::~AsyncFileStream()
     });
 }
 
-void AsyncFileStream::perform(Function<std::function<void(FileStreamClient&)>(FileStream&)>&& operation)
+void AsyncFileStream::perform(NoncopyableFunction<std::function<void(FileStreamClient&)>(FileStream&)>&& operation)
 {
     auto& internals = *m_internals;
     callOnFileThread([&internals, operation = WTFMove(operation)] {
index 35e85a7..088bb37 100644 (file)
@@ -34,7 +34,7 @@
 
 #include <functional>
 #include <wtf/Forward.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 
 namespace WebCore {
 
@@ -57,7 +57,7 @@ public:
 
 private:
     void start();
-    void perform(Function<std::function<void(FileStreamClient&)>(FileStream&)>&&);
+    void perform(NoncopyableFunction<std::function<void(FileStreamClient&)>(FileStream&)>&&);
 
     struct Internals;
     std::unique_ptr<Internals> m_internals;
index 95ec782..f05bf1a 100644 (file)
@@ -3133,7 +3133,7 @@ void FrameView::flushAnyPendingPostLayoutTasks()
         updateEmbeddedObjectsTimerFired();
 }
 
-void FrameView::queuePostLayoutCallback(Function<void()>&& callback)
+void FrameView::queuePostLayoutCallback(NoncopyableFunction<void()>&& callback)
 {
     m_postLayoutCallbackQueue.append(WTFMove(callback));
 }
@@ -3146,7 +3146,7 @@ void FrameView::flushPostLayoutTasksQueue()
     if (!m_postLayoutCallbackQueue.size())
         return;
 
-    Vector<Function<void()>> queue = WTFMove(m_postLayoutCallbackQueue);
+    Vector<NoncopyableFunction<void()>> queue = WTFMove(m_postLayoutCallbackQueue);
     for (auto& task : queue)
         task();
 }
index e58cf62..f4449e5 100644 (file)
@@ -37,7 +37,7 @@
 #include <wtf/Forward.h>
 #include <wtf/HashSet.h>
 #include <wtf/ListHashSet.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -111,7 +111,7 @@ public:
     void scheduleRelayout();
     void scheduleRelayoutOfSubtree(RenderElement&);
     void unscheduleRelayout();
-    void queuePostLayoutCallback(Function<void()>&&);
+    void queuePostLayoutCallback(NoncopyableFunction<void()>&&);
     bool layoutPending() const;
     bool isInLayout() const { return m_layoutPhase != OutsideLayout; }
     bool isInRenderTreeLayout() const { return m_layoutPhase == InRenderTreeLayout; }
@@ -828,7 +828,7 @@ private:
     ScrollPinningBehavior m_scrollPinningBehavior;
 
     IntRect* m_cachedWindowClipRect { nullptr };
-    Vector<Function<void()>> m_postLayoutCallbackQueue;
+    Vector<NoncopyableFunction<void()>> m_postLayoutCallbackQueue;
 };
 
 inline void FrameView::incrementVisuallyNonEmptyCharacterCount(unsigned count)
index 730c0a6..5760783 100644 (file)
@@ -45,7 +45,7 @@ bool ScrollingThread::isCurrentThread()
     return threadIdentifier && currentThread() == threadIdentifier;
 }
 
-void ScrollingThread::dispatch(Function<void ()>&& function)
+void ScrollingThread::dispatch(NoncopyableFunction<void ()>&& function)
 {
     auto& scrollingThread = ScrollingThread::singleton();
     scrollingThread.createThreadIfNeeded();
@@ -58,7 +58,7 @@ void ScrollingThread::dispatch(Function<void ()>&& function)
     scrollingThread.wakeUpRunLoop();
 }
 
-void ScrollingThread::dispatchBarrier(Function<void ()>&& function)
+void ScrollingThread::dispatchBarrier(NoncopyableFunction<void ()>&& function)
 {
     dispatch([function = WTFMove(function)]() mutable {
         callOnMainThread(WTFMove(function));
@@ -104,7 +104,7 @@ void ScrollingThread::dispatchFunctionsFromScrollingThread()
 {
     ASSERT(isCurrentThread());
 
-    Vector<Function<void ()>> functions;
+    Vector<NoncopyableFunction<void ()>> functions;
     
     {
         std::lock_guard<Lock> lock(m_functionsMutex);
index 5509055..037f95b 100644 (file)
@@ -33,7 +33,7 @@
 #include <wtf/Forward.h>
 #include <wtf/Lock.h>
 #include <wtf/Noncopyable.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/Threading.h>
 #include <wtf/Vector.h>
 
@@ -48,11 +48,11 @@ class ScrollingThread {
 
 public:
     static bool isCurrentThread();
-    WEBCORE_EXPORT static void dispatch(Function<void ()>&&);
+    WEBCORE_EXPORT static void dispatch(NoncopyableFunction<void ()>&&);
 
     // Will dispatch the given function on the main thread once all pending functions
     // on the scrolling thread have finished executing. Used for synchronization purposes.
-    WEBCORE_EXPORT static void dispatchBarrier(Function<void ()>&&);
+    WEBCORE_EXPORT static void dispatchBarrier(NoncopyableFunction<void ()>&&);
 
 private:
     friend NeverDestroyed<ScrollingThread>;
@@ -80,7 +80,7 @@ private:
     Lock m_initializeRunLoopMutex;
 
     Lock m_functionsMutex;
-    Vector<Function<void ()>> m_functions;
+    Vector<NoncopyableFunction<void ()>> m_functions;
 
 #if PLATFORM(COCOA)
     // FIXME: We should use WebCore::RunLoop here.
index 1aa7e1b..0c6c243 100644 (file)
@@ -36,7 +36,7 @@ TaskDispatcher<Timer>::TaskDispatcher()
 {
 }
 
-void TaskDispatcher<Timer>::postTask(Function<void()>&& function)
+void TaskDispatcher<Timer>::postTask(NoncopyableFunction<void()>&& function)
 {
     m_pendingTasks.append(WTFMove(function));
     pendingDispatchers().append(m_weakPtrFactory.createWeakPtr());
index f50a361..4d85c9a 100644 (file)
@@ -27,7 +27,7 @@
 
 #include "Timer.h"
 #include <wtf/Deque.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/WeakPtr.h>
 
 namespace WebCore {
@@ -40,7 +40,7 @@ public:
     {
     }
 
-    void postTask(Function<void()>&& f)
+    void postTask(NoncopyableFunction<void()>&& f)
     {
         m_context.postTask(WTFMove(f));
     }
@@ -53,7 +53,7 @@ template<>
 class TaskDispatcher<Timer> {
 public:
     TaskDispatcher();
-    void postTask(Function<void()>&&);
+    void postTask(NoncopyableFunction<void()>&&);
 
 private:
     static Timer& sharedTimer();
@@ -63,7 +63,7 @@ private:
     void dispatchOneTask();
 
     WeakPtrFactory<TaskDispatcher> m_weakPtrFactory;
-    Deque<Function<void()>> m_pendingTasks;
+    Deque<NoncopyableFunction<void()>> m_pendingTasks;
 };
 
 template <typename T>
@@ -81,7 +81,7 @@ public:
     {
     }
 
-    typedef Function<void()> TaskFunction;
+    typedef NoncopyableFunction<void()> TaskFunction;
 
     void enqueueTask(TaskFunction&& task)
     {
index 989b2ef..869a68e 100644 (file)
@@ -31,7 +31,7 @@
 #include "MediaPlayerPrivate.h"
 #include "MediaStreamPrivate.h"
 #include <wtf/MediaTime.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/Vector.h>
 #include <wtf/WeakPtr.h>
 
@@ -143,7 +143,7 @@ private:
     void updateTracks();
     void renderingModeChanged();
 
-    void scheduleDeferredTask(Function<void ()>&&);
+    void scheduleDeferredTask(NoncopyableFunction<void ()>&&);
 
     enum DisplayMode {
         None,
index abf437d..84c7d62 100644 (file)
@@ -624,7 +624,7 @@ void MediaPlayerPrivateMediaStreamAVFObjC::setNetworkState(MediaPlayer::NetworkS
     m_player->networkStateChanged();
 }
 
-void MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask(Function<void ()>&& function)
+void MediaPlayerPrivateMediaStreamAVFObjC::scheduleDeferredTask(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(function);
     callOnMainThread([weakThis = createWeakPtr(), function = WTFMove(function)] {
index 1872cd2..d49d151 100644 (file)
@@ -299,7 +299,7 @@ void MediaStreamPrivate::trackEnded(MediaStreamTrackPrivate&)
     });
 }
 
-void MediaStreamPrivate::scheduleDeferredTask(Function<void ()>&& function)
+void MediaStreamPrivate::scheduleDeferredTask(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(function);
     callOnMainThread([weakThis = createWeakPtr(), function = WTFMove(function)] {
index 25c4db4..92304ef 100644 (file)
@@ -41,7 +41,7 @@
 #include "MediaStreamTrackPrivate.h"
 #include <wtf/HashMap.h>
 #include <wtf/MediaTime.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RefPtr.h>
 #include <wtf/Vector.h>
@@ -112,7 +112,7 @@ private:
     void characteristicsChanged();
     void updateActiveVideoTrack();
 
-    void scheduleDeferredTask(Function<void ()>&&);
+    void scheduleDeferredTask(NoncopyableFunction<void ()>&&);
 
     WeakPtrFactory<MediaStreamPrivate> m_weakPtrFactory;
     Vector<Observer*> m_observers;
index 74d7ffc..f474aeb 100644 (file)
@@ -31,7 +31,7 @@
 #include "GenericTaskQueue.h"
 #include "RealtimeMediaSource.h"
 #include "Timer.h"
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/RetainPtr.h>
 #include <wtf/WeakPtr.h>
 
@@ -86,7 +86,7 @@ protected:
     void setVideoSampleBufferDelegate(AVCaptureVideoDataOutput*);
     void setAudioSampleBufferDelegate(AVCaptureAudioDataOutput*);
 
-    void scheduleDeferredTask(Function<void ()>&&);
+    void scheduleDeferredTask(NoncopyableFunction<void ()>&&);
 
 private:
     void setupSession();
index c2d928d..76afd9b 100644 (file)
@@ -240,7 +240,7 @@ void AVMediaCaptureSource::setAudioSampleBufferDelegate(AVCaptureAudioDataOutput
     [audioOutput setSampleBufferDelegate:m_objcObserver.get() queue:globaAudioCaptureSerialQueue()];
 }
 
-void AVMediaCaptureSource::scheduleDeferredTask(Function<void ()>&& function)
+void AVMediaCaptureSource::scheduleDeferredTask(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(function);
     callOnMainThread([weakThis = createWeakPtr(), function = WTFMove(function)] {
index 24b412c..e172563 100644 (file)
@@ -521,13 +521,13 @@ std::unique_ptr<Update> TreeResolver::resolve(Change change)
     return WTFMove(m_update);
 }
 
-static Vector<Function<void ()>>& postResolutionCallbackQueue()
+static Vector<NoncopyableFunction<void ()>>& postResolutionCallbackQueue()
 {
-    static NeverDestroyed<Vector<Function<void ()>>> vector;
+    static NeverDestroyed<Vector<NoncopyableFunction<void ()>>> vector;
     return vector;
 }
 
-void queuePostResolutionCallback(Function<void ()>&& callback)
+void queuePostResolutionCallback(NoncopyableFunction<void ()>&& callback)
 {
     postResolutionCallbackQueue().append(WTFMove(callback));
 }
index 7cd913f..3ce7046 100644 (file)
@@ -34,7 +34,7 @@
 #include "StyleUpdate.h"
 #include <functional>
 #include <wtf/HashMap.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/RefPtr.h>
 
 namespace WebCore {
@@ -110,7 +110,7 @@ private:
     std::unique_ptr<Update> m_update;
 };
 
-void queuePostResolutionCallback(Function<void ()>&&);
+void queuePostResolutionCallback(NoncopyableFunction<void ()>&&);
 bool postResolutionCallbacksAreSuspended();
 
 bool isPlaceholderStyle(const RenderStyle&);
index d66df71..c6a8519 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-03  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r201663.
+        https://bugs.webkit.org/show_bug.cgi?id=158374
+
+        Broke the Windows build (Requested by andersca on #webkit).
+
+        Reverted changeset:
+
+        "Rename NoncopyableFunction to Function"
+        https://bugs.webkit.org/show_bug.cgi?id=158354
+        http://trac.webkit.org/changeset/201663
+
 2016-06-03  Anders Carlsson  <andersca@apple.com>
 
         Rename NoncopyableFunction to Function
index edc9eb3..e1a4a15 100644 (file)
@@ -63,7 +63,7 @@ String StorageSyncManager::fullDatabaseFilename(const String& databaseIdentifier
     return pathByAppendingComponent(m_path, databaseIdentifier + ".localstorage");
 }
 
-void StorageSyncManager::dispatch(Function<void ()>&& function)
+void StorageSyncManager::dispatch(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(isMainThread());
     ASSERT(m_thread);
index 89e6b43..75a486b 100644 (file)
@@ -28,7 +28,7 @@
 
 #include <functional>
 #include <wtf/Forward.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 #include <wtf/text/WTFString.h>
@@ -43,7 +43,7 @@ public:
     static Ref<StorageSyncManager> create(const String& path);
     ~StorageSyncManager();
 
-    void dispatch(Function<void ()>&&);
+    void dispatch(NoncopyableFunction<void ()>&&);
     void close();
 
 private:
index 0b6ed07..2966e04 100644 (file)
@@ -74,11 +74,11 @@ void StorageThread::threadEntryPoint()
     }
 }
 
-void StorageThread::dispatch(Function<void ()>&& function)
+void StorageThread::dispatch(NoncopyableFunction<void ()>&& function)
 {
     ASSERT(isMainThread());
     ASSERT(!m_queue.killed() && m_threadID);
-    m_queue.append(std::make_unique<Function<void ()>>(WTFMove(function)));
+    m_queue.append(std::make_unique<NoncopyableFunction<void ()>>(WTFMove(function)));
 }
 
 void StorageThread::terminate()
@@ -90,7 +90,7 @@ void StorageThread::terminate()
     if (!m_threadID)
         return;
 
-    m_queue.append(std::make_unique<Function<void ()>>([this] {
+    m_queue.append(std::make_unique<NoncopyableFunction<void ()>>([this] {
         performTerminate();
     }));
     waitForThreadCompletion(m_threadID);
index 3f1b884..4752d5b 100644 (file)
 #ifndef StorageThread_h
 #define StorageThread_h
 
-#include <wtf/Function.h>
+#include <functional>
 #include <wtf/HashSet.h>
 #include <wtf/MessageQueue.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/Threading.h>
 
 namespace WebCore {
@@ -45,7 +46,7 @@ public:
     bool start();
     void terminate();
 
-    void dispatch(Function<void ()>&&);
+    void dispatch(NoncopyableFunction<void ()>&&);
 
     static void releaseFastMallocFreeMemoryInAllThreads();
 
@@ -58,7 +59,7 @@ private:
     void performTerminate();
 
     ThreadIdentifier m_threadID;
-    MessageQueue<Function<void ()>> m_queue;
+    MessageQueue<NoncopyableFunction<void ()>> m_queue;
 };
 
 } // namespace WebCore
index 3bf1293..1ff8a9e 100644 (file)
@@ -1,3 +1,16 @@
+2016-06-03  Commit Queue  <commit-queue@webkit.org>
+
+        Unreviewed, rolling out r201663.
+        https://bugs.webkit.org/show_bug.cgi?id=158374
+
+        Broke the Windows build (Requested by andersca on #webkit).
+
+        Reverted changeset:
+
+        "Rename NoncopyableFunction to Function"
+        https://bugs.webkit.org/show_bug.cgi?id=158354
+        http://trac.webkit.org/changeset/201663
+
 2016-06-03  Anders Carlsson  <andersca@apple.com>
 
         Rename NoncopyableFunction to Function
index 73e5ac9..3ffd541 100644 (file)
@@ -308,7 +308,7 @@ void NetworkProcess::didGrantSandboxExtensionsToDatabaseProcessForBlobs(uint64_t
         handler();
 }
 
-static void fetchDiskCacheEntries(SessionID sessionID, OptionSet<WebsiteDataFetchOption> fetchOptions, Function<void (Vector<WebsiteData::Entry>)>&& completionHandler)
+static void fetchDiskCacheEntries(SessionID sessionID, OptionSet<WebsiteDataFetchOption> fetchOptions, NoncopyableFunction<void (Vector<WebsiteData::Entry>)>&& completionHandler)
 {
 #if ENABLE(NETWORK_CACHE)
     if (NetworkCache::singleton().isEnabled()) {
@@ -352,7 +352,7 @@ static void fetchDiskCacheEntries(SessionID sessionID, OptionSet<WebsiteDataFetc
 void NetworkProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, OptionSet<WebsiteDataFetchOption> fetchOptions, uint64_t callbackID)
 {
     struct CallbackAggregator final : public RefCounted<CallbackAggregator> {
-        explicit CallbackAggregator(Function<void (WebsiteData)>&& completionHandler)
+        explicit CallbackAggregator(NoncopyableFunction<void (WebsiteData)>&& completionHandler)
             : m_completionHandler(WTFMove(completionHandler))
         {
         }
@@ -366,7 +366,7 @@ void NetworkProcess::fetchWebsiteData(SessionID sessionID, OptionSet<WebsiteData
             });
         }
 
-        Function<void (WebsiteData)> m_completionHandler;
+        NoncopyableFunction<void (WebsiteData)> m_completionHandler;
         WebsiteData m_websiteData;
     };
 
@@ -412,7 +412,7 @@ void NetworkProcess::deleteWebsiteData(SessionID sessionID, OptionSet<WebsiteDat
     completionHandler();
 }
 
-static void clearDiskCacheEntries(const Vector<SecurityOriginData>& origins, Function<void ()>&& completionHandler)
+static void clearDiskCacheEntries(const Vector<SecurityOriginData>& origins, NoncopyableFunction<void ()>&& completionHandler)
 {
 #if ENABLE(NETWORK_CACHE)
     if (NetworkCache::singleton().isEnabled()) {
index 8133c22..6504e75 100644 (file)
@@ -35,8 +35,8 @@
 #include <WebCore/SessionID.h>
 #include <memory>
 #include <wtf/Forward.h>
-#include <wtf/Function.h>
 #include <wtf/NeverDestroyed.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/RetainPtr.h>
 
 #if PLATFORM(IOS)
index e49131f..0767618 100644 (file)
@@ -521,7 +521,7 @@ void Cache::remove(const WebCore::ResourceRequest& request)
     remove(makeCacheKey(request));
 }
 
-void Cache::traverse(Function<void (const TraversalEntry*)>&& traverseHandler)
+void Cache::traverse(NoncopyableFunction<void (const TraversalEntry*)>&& traverseHandler)
 {
     ASSERT(isEnabled());
 
index 2c6b7c2..8e23dc1 100644 (file)
@@ -32,7 +32,7 @@
 #include "NetworkCacheStorage.h"
 #include "ShareableResource.h"
 #include <WebCore/ResourceResponse.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -114,7 +114,7 @@ public:
         const Entry& entry;
         const Storage::RecordInfo& recordInfo;
     };
-    void traverse(Function<void (const TraversalEntry*)>&&);
+    void traverse(NoncopyableFunction<void (const TraversalEntry*)>&&);
     void remove(const Key&);
     void remove(const WebCore::ResourceRequest&);
 
index 84b9497..8c91c9e 100644 (file)
@@ -69,7 +69,7 @@ Ref<IOChannel> IOChannel::open(const String& filePath, IOChannel::Type type)
     return adoptRef(*new IOChannel(filePath, type));
 }
 
-static inline void runTaskInQueue(Function<void ()>&& task, WorkQueue* queue)
+static inline void runTaskInQueue(NoncopyableFunction<void ()>&& task, WorkQueue* queue)
 {
     if (queue) {
         queue->dispatch(WTFMove(task));
index 957f40d..e25d38c 100644 (file)
@@ -35,7 +35,7 @@
 #include <wtf/BloomFilter.h>
 #include <wtf/Deque.h>
 #include <wtf/HashSet.h>
-#include <wtf/Function.h>
+#include <wtf/NoncopyableFunction.h>
 #include <wtf/Optional.h>
 #include <wtf/WorkQueue.h>
 #include <wtf/text/WTFString.h>
@@ -79,7 +79,7 @@ public:
         ShareCount = 1 << 1,
     };
     typedef unsigned TraverseFlags;
-    typedef Function<void (const Record*, const RecordInfo&)> TraverseHandler;
+    typedef NoncopyableFunction<void (const Record*, const RecordInfo&)> TraverseHandler;
     // Null record signals end.
     void traverse(const String& type, TraverseFlags, TraverseHandler&&);