Title: [250560] trunk/Source/WebCore
- Revision
- 250560
- Author
- [email protected]
- Date
- 2019-10-01 09:48:41 -0700 (Tue, 01 Oct 2019)
Log Message
Unreviewed attempt to fix Windows build after r250527.
* dom/GenericEventQueue.cpp:
(WebCore::TaskQueueConstructor::construct):
(WebCore::TaskQueueConstructor<Timer>::construct):
(WebCore::GenericEventQueueBase<T>::enqueueEvent):
(WebCore::GenericEventQueueBase<T>::close):
(WebCore::GenericEventQueueBase<T>::cancelAllEvents):
(WebCore::GenericEventQueueBase<T>::setPaused):
(WebCore::GenericEventQueueBase<T>::suspend):
(WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
* dom/GenericEventQueue.h:
* platform/GenericTaskQueue.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250559 => 250560)
--- trunk/Source/WebCore/ChangeLog 2019-10-01 16:38:26 UTC (rev 250559)
+++ trunk/Source/WebCore/ChangeLog 2019-10-01 16:48:41 UTC (rev 250560)
@@ -1,3 +1,19 @@
+2019-10-01 Chris Dumez <[email protected]>
+
+ Unreviewed attempt to fix Windows build after r250527.
+
+ * dom/GenericEventQueue.cpp:
+ (WebCore::TaskQueueConstructor::construct):
+ (WebCore::TaskQueueConstructor<Timer>::construct):
+ (WebCore::GenericEventQueueBase<T>::enqueueEvent):
+ (WebCore::GenericEventQueueBase<T>::close):
+ (WebCore::GenericEventQueueBase<T>::cancelAllEvents):
+ (WebCore::GenericEventQueueBase<T>::setPaused):
+ (WebCore::GenericEventQueueBase<T>::suspend):
+ (WebCore::GenericEventQueueBase<T>::rescheduleAllEventsIfNeeded):
+ * dom/GenericEventQueue.h:
+ * platform/GenericTaskQueue.h:
+
2019-10-01 Alex Christensen <[email protected]>
Fix internal build after r250549
Modified: trunk/Source/WebCore/dom/GenericEventQueue.cpp (250559 => 250560)
--- trunk/Source/WebCore/dom/GenericEventQueue.cpp 2019-10-01 16:38:26 UTC (rev 250559)
+++ trunk/Source/WebCore/dom/GenericEventQueue.cpp 2019-10-01 16:48:41 UTC (rev 250560)
@@ -37,11 +37,11 @@
namespace WebCore {
template<typename T> struct TaskQueueConstructor {
- static GenericTaskQueue<T> construct(ScriptExecutionContext* context) { return GenericTaskQueue<T>(context); }
+ static UniqueRef<GenericTaskQueue<T>> construct(ScriptExecutionContext* context) { return makeUniqueRef<GenericTaskQueue<T>>(context); }
};
template<> struct TaskQueueConstructor<Timer> {
- static GenericTaskQueue<Timer> construct(ScriptExecutionContext*) { return GenericTaskQueue<Timer>(); }
+ static UniqueRef<GenericTaskQueue<Timer>> construct(ScriptExecutionContext*) { return makeUniqueRef<GenericTaskQueue<Timer>>(); }
};
template<typename T>
@@ -69,7 +69,7 @@
if (isSuspendedOrPausedByClient())
return;
- m_taskQueue.enqueueTask(std::bind(&GenericEventQueueBase::dispatchOneEvent, this));
+ m_taskQueue->enqueueTask(std::bind(&GenericEventQueueBase::dispatchOneEvent, this));
}
template<typename T>
@@ -91,7 +91,7 @@
{
m_isClosed = true;
- m_taskQueue.close();
+ m_taskQueue->close();
m_pendingEvents.clear();
}
@@ -98,7 +98,7 @@
template<typename T>
void GenericEventQueueBase<T>::cancelAllEvents()
{
- m_taskQueue.cancelAllTasks();
+ m_taskQueue->cancelAllTasks();
m_pendingEvents.clear();
}
@@ -127,7 +127,7 @@
m_isPausedByClient = shouldPause;
if (shouldPause)
- m_taskQueue.cancelAllTasks();
+ m_taskQueue->cancelAllTasks();
else
rescheduleAllEventsIfNeeded();
}
@@ -145,7 +145,7 @@
return;
m_isSuspended = true;
- m_taskQueue.cancelAllTasks();
+ m_taskQueue->cancelAllTasks();
}
template<typename T>
@@ -165,7 +165,7 @@
return;
for (unsigned i = 0; i < m_pendingEvents.size(); ++i)
- m_taskQueue.enqueueTask(std::bind(&GenericEventQueueBase::dispatchOneEvent, this));
+ m_taskQueue->enqueueTask(std::bind(&GenericEventQueueBase::dispatchOneEvent, this));
}
template<typename T>
Modified: trunk/Source/WebCore/dom/GenericEventQueue.h (250559 => 250560)
--- trunk/Source/WebCore/dom/GenericEventQueue.h 2019-10-01 16:38:26 UTC (rev 250559)
+++ trunk/Source/WebCore/dom/GenericEventQueue.h 2019-10-01 16:48:41 UTC (rev 250560)
@@ -70,7 +70,7 @@
bool isSuspendedOrPausedByClient() const { return m_isSuspended || m_isPausedByClient; }
EventTarget& m_owner;
- GenericTaskQueue<T> m_taskQueue;
+ UniqueRef<GenericTaskQueue<T>> m_taskQueue;
Deque<RefPtr<Event>> m_pendingEvents;
bool m_isClosed { false };
bool m_isPausedByClient { false };
Modified: trunk/Source/WebCore/platform/GenericTaskQueue.h (250559 => 250560)
--- trunk/Source/WebCore/platform/GenericTaskQueue.h 2019-10-01 16:38:26 UTC (rev 250559)
+++ trunk/Source/WebCore/platform/GenericTaskQueue.h 2019-10-01 16:48:41 UTC (rev 250560)
@@ -73,6 +73,7 @@
template <typename T>
class GenericTaskQueue : public CanMakeWeakPtr<GenericTaskQueue<T>> {
+ WTF_MAKE_FAST_ALLOCATED;
public:
GenericTaskQueue()
: m_dispatcher()
@@ -90,9 +91,6 @@
{
}
- GenericTaskQueue(GenericTaskQueue&&) = default;
- GenericTaskQueue& operator=(GenericTaskQueue&&) = default;
-
typedef WTF::Function<void ()> TaskFunction;
void enqueueTask(TaskFunction&& task)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes