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

Unified Diff: third_party/WebKit/Source/platform/heap/GCTaskRunner.h

Issue 2701623003: Remove BlinkGCInterruptor (Closed)
Patch Set: Created 3 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/heap/GCTaskRunner.h
diff --git a/third_party/WebKit/Source/platform/heap/GCTaskRunner.h b/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
index 60f71569e419273fd50fc1f7cf4fb0741e6ae551..5b9d114b25688136ee20288e303dd4b16dff188e 100644
--- a/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
+++ b/third_party/WebKit/Source/platform/heap/GCTaskRunner.h
@@ -41,30 +41,6 @@
namespace blink {
-class MessageLoopInterruptor final : public BlinkGCInterruptor {
- public:
- explicit MessageLoopInterruptor(RefPtr<WebTaskRunner> taskRunner)
- : m_taskRunner(std::move(taskRunner)) {}
-
- void requestInterrupt() override {
- // GCTask has an empty run() method. Its only purpose is to guarantee
- // that MessageLoop will have a task to process which will result
- // in GCTaskRunner::didProcessTask being executed.
- m_taskRunner->postTask(BLINK_FROM_HERE, crossThreadBind(&runGCTask));
- }
-
- private:
- static void runGCTask() {
- // Don't do anything here because we don't know if this is
- // a nested event loop or not. GCTaskRunner::didProcessTask
- // will enter correct safepoint for us.
- // We are not calling onInterrupted() because that always
- // conservatively enters safepoint with pointers on stack.
- }
-
- RefPtr<WebTaskRunner> m_taskRunner;
-};
-
class GCTaskObserver final : public WebThread::TaskObserver {
USING_FAST_MALLOC(GCTaskObserver);
@@ -103,8 +79,6 @@ class GCTaskRunner final {
: m_gcTaskObserver(WTF::wrapUnique(new GCTaskObserver)),
m_thread(thread) {
m_thread->addTaskObserver(m_gcTaskObserver.get());
- ThreadState::current()->addInterruptor(WTF::wrapUnique(
- new MessageLoopInterruptor(thread->getWebTaskRunner())));
}
~GCTaskRunner() { m_thread->removeTaskObserver(m_gcTaskObserver.get()); }
« no previous file with comments | « third_party/WebKit/Source/platform/heap/BlinkGCInterruptor.cpp ('k') | third_party/WebKit/Source/platform/heap/ThreadState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698