Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Unified Diff: third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp

Issue 1713143002: Remove most of the blink::Task wrapping of WTF::Function outside WebTaskRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
index 204b90e92cca523e18cac520e64ca2e373cf11ef..3c34665be96b5cb965a9a50f3f9c56f14327adfd 100644
--- a/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerInspectorProxy.cpp
@@ -9,9 +9,9 @@
#include "core/inspector/InspectorTraceEvents.h"
#include "core/inspector/WorkerInspectorController.h"
#include "core/workers/WorkerThread.h"
-#include "platform/Task.h"
#include "platform/TraceEvent.h"
#include "platform/weborigin/KURL.h"
+#include "public/platform/WebTaskRunner.h"
#include "public/platform/WebTraceLocation.h"
namespace blink {
@@ -59,7 +59,7 @@ void WorkerInspectorProxy::connectToInspector(WorkerInspectorProxy::PageInspecto
return;
ASSERT(!m_pageInspector);
m_pageInspector = pageInspector;
- addDebuggerTaskForWorker(BLINK_FROM_HERE, adoptPtr(new Task(threadSafeBind(connectToWorkerGlobalScopeInspectorTask, AllowCrossThreadAccess(m_workerThread)))));
+ addDebuggerTaskForWorker(BLINK_FROM_HERE, threadSafeBind(connectToWorkerGlobalScopeInspectorTask, AllowCrossThreadAccess(m_workerThread)));
}
static void disconnectFromWorkerGlobalScopeInspectorTask(WorkerThread* workerThread)
@@ -72,7 +72,7 @@ void WorkerInspectorProxy::disconnectFromInspector()
m_pageInspector = nullptr;
if (!m_workerThread)
return;
- addDebuggerTaskForWorker(BLINK_FROM_HERE, adoptPtr(new Task(threadSafeBind(disconnectFromWorkerGlobalScopeInspectorTask, AllowCrossThreadAccess(m_workerThread)))));
+ addDebuggerTaskForWorker(BLINK_FROM_HERE, threadSafeBind(disconnectFromWorkerGlobalScopeInspectorTask, AllowCrossThreadAccess(m_workerThread)));
}
static void dispatchOnInspectorBackendTask(const String& message, WorkerThread* workerThread)
@@ -84,7 +84,7 @@ void WorkerInspectorProxy::sendMessageToInspector(const String& message)
{
if (!m_workerThread)
return;
- addDebuggerTaskForWorker(BLINK_FROM_HERE, adoptPtr(new Task(threadSafeBind(dispatchOnInspectorBackendTask, message, AllowCrossThreadAccess(m_workerThread)))));
+ addDebuggerTaskForWorker(BLINK_FROM_HERE, threadSafeBind(dispatchOnInspectorBackendTask, message, AllowCrossThreadAccess(m_workerThread)));
m_workerThread->interruptAndDispatchInspectorCommands();
}
@@ -100,10 +100,10 @@ static void runDebuggerTaskForWorker(WorkerThread* workerThread)
workerThread->runDebuggerTask(WorkerThread::DontWaitForTask);
}
-void WorkerInspectorProxy::addDebuggerTaskForWorker(const WebTraceLocation& location, PassOwnPtr<WebTaskRunner::Task> task)
+void WorkerInspectorProxy::addDebuggerTaskForWorker(const WebTraceLocation& location, PassOwnPtr<Closure> task)
{
m_workerThread->appendDebuggerTask(task);
- m_workerThread->backingThread().postTask(location, new Task(threadSafeBind(&runDebuggerTaskForWorker, AllowCrossThreadAccess(m_workerThread))));
+ m_workerThread->backingThread().postTask(location, threadSafeBind(&runDebuggerTaskForWorker, AllowCrossThreadAccess(m_workerThread)));
}
DEFINE_TRACE(WorkerInspectorProxy)
« no previous file with comments | « third_party/WebKit/Source/core/workers/WorkerInspectorProxy.h ('k') | third_party/WebKit/Source/core/workers/WorkerThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698