Clean up ScriptExecutionContext::Task and subclasses
Created attachment 213620 [details] Patch
Comment on attachment 213620 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=213620&action=review > Source/WebCore/Modules/webdatabase/Database.cpp:89 > + DerefContextTask(PassRefPtr<ScriptExecutionContext> context) explicit > Source/WebCore/Modules/webdatabase/Database.cpp:203 > + DeliverPendingCallbackTask(PassRefPtr<SQLTransaction> transaction) explicit > Source/WebCore/Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:236 > + Vector<std::unique_ptr<ScriptExecutionContext::Task>> tasks = std::move(m_pendingTasks); auto > Source/WebCore/bindings/js/JSCallbackData.h:80 > + DeleteCallbackDataTask(JSCallbackData* data) explicit > Source/WebCore/dom/Document.cpp:4900 > - OwnPtr<Task> task = m_pendingTasks[0].release(); > + auto task = std::move(m_pendingTasks[0]); > m_pendingTasks.remove(0); This code looks pretty inefficient, taking the first element out of a vector in a loop :| > Source/WebCore/workers/WorkerMessagingProxy.cpp:156 > WorkerTerminateTask(WorkerMessagingProxy* messagingProxy) explicit > Source/WebCore/workers/WorkerMessagingProxy.cpp:213 > NotifyNetworkStateChangeTask(bool isOnLine) explicit
Committed r157061: <http://trac.webkit.org/changeset/157061>
This broke the Windows build: http://build.webkit.org/builders/Apple%20Win%20Release%20(Build)/builds/53127/steps/compile-webkit/logs/stdio/text
Re-opened since this is blocked by bug 122479