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

Unified Diff: third_party/WebKit/Source/platform/WebThreadSupportingGC.h

Issue 1549143002: Add thread affinity and ASSERT() for same-thread restriction to WTF::Function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@TRV_ThreadSafeBindByVariadicTemplate
Patch Set: 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/platform/WebThreadSupportingGC.h
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.h b/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
index b9fb4e799972d03e2c7eb940a53c2ea4e0b50d9e..672177a3a842df7f4d37891cb31dbc78c8e93d63 100644
--- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
+++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.h
@@ -33,9 +33,9 @@ public:
static PassOwnPtr<WebThreadSupportingGC> createForThread(WebThread*);
~WebThreadSupportingGC();
- void postTask(const WebTraceLocation& location, PassOwnPtr<Closure> task)
+ void postTask(const WebTraceLocation& location, PassOwnPtr<Closure> closure)
{
- m_thread->taskRunner()->postTask(location, task);
+ m_thread->taskRunner()->postTask(location, closure);
}
void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<Closure> task, long long delayMs)
@@ -43,6 +43,16 @@ public:
m_thread->taskRunner()->postDelayedTask(location, task, delayMs);
}
+ void postTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosure> task)
+ {
+ m_thread->taskRunner()->postTask(location, task);
+ }
+
+ void postDelayedTask(const WebTraceLocation& location, PassOwnPtr<CrossThreadClosure> task, long long delayMs)
+ {
+ m_thread->taskRunner()->postDelayedTask(location, task, delayMs);
+ }
+
bool isCurrentThread() const
{
return m_thread->isCurrentThread();

Powered by Google App Engine
This is Rietveld 408576698