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

Unified Diff: sky/engine/platform/SharedBuffer.cpp

Issue 691493004: Remove callOnMainThread (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | sky/engine/platform/testing/RunAllTests.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/SharedBuffer.cpp
diff --git a/sky/engine/platform/SharedBuffer.cpp b/sky/engine/platform/SharedBuffer.cpp
index f6cf3dc50d0e9f6b4dff0f2da99192fdeadd1e54..0cb7a89ea6d939a0c44e46e698e623f834a268c6 100644
--- a/sky/engine/platform/SharedBuffer.cpp
+++ b/sky/engine/platform/SharedBuffer.cpp
@@ -27,6 +27,8 @@
#include "config.h"
#include "platform/SharedBuffer.h"
+#include "base/bind.h"
+#include "public/platform/Platform.h"
#include "wtf/unicode/Unicode.h"
#include "wtf/unicode/UTF8.h"
@@ -34,7 +36,6 @@
#ifdef SHARED_BUFFER_STATS
#include "wtf/DataLog.h"
-#include "wtf/MainThread.h"
#endif
namespace blink {
@@ -106,7 +107,7 @@ static CString snippetForBuffer(SharedBuffer* sharedBuffer)
return result;
}
-static void printStats(void*)
+static void printStats()
{
MutexLocker locker(statsMutex());
Vector<SharedBuffer*> buffers;
@@ -126,7 +127,7 @@ static void didCreateSharedBuffer(SharedBuffer* buffer)
MutexLocker locker(statsMutex());
liveBuffers().add(buffer);
- callOnMainThread(printStats, 0);
+ Platform::current()->mainThreadTaskRunner()->PostTask(FROM_HERE, base::Bind(&printStats));
}
static void willDestroySharedBuffer(SharedBuffer* buffer)
« no previous file with comments | « no previous file | sky/engine/platform/testing/RunAllTests.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698