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

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

Issue 1419513007: Oilpan: Introduce GCTaskRunner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
Index: third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
diff --git a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
index 0902c7a4bb0f0afb99ceee4175bcdc74bf48bf51..bf50fd6262ed15a2121042490857072195626105 100644
--- a/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
+++ b/third_party/WebKit/Source/platform/WebThreadSupportingGC.cpp
@@ -48,17 +48,14 @@ WebThreadSupportingGC::~WebThreadSupportingGC()
void WebThreadSupportingGC::initialize()
{
- m_pendingGCRunner = adoptPtr(new PendingGCRunner);
- m_thread->addTaskObserver(m_pendingGCRunner.get());
ThreadState::attach();
- OwnPtr<MessageLoopInterruptor> interruptor = adoptPtr(new MessageLoopInterruptor(m_thread->taskRunner()));
- ThreadState::current()->addInterruptor(interruptor.release());
+ m_gcTaskRunner = adoptPtr(new GCTaskRunner(m_thread));
}
void WebThreadSupportingGC::shutdown()
{
// Ensure no posted tasks will run from this point on.
- m_thread->removeTaskObserver(m_pendingGCRunner.get());
+ m_gcTaskRunner.clear();
// Shutdown the thread (via its scheduler) only when the thread is created
// and is owned by this instance.
@@ -66,7 +63,6 @@ void WebThreadSupportingGC::shutdown()
m_owningThread->scheduler()->shutdown();
ThreadState::detach();
- m_pendingGCRunner = nullptr;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/WebThreadSupportingGC.h ('k') | third_party/WebKit/Source/platform/heap/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698