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

Unified Diff: third_party/WebKit/Source/web/WebKit.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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/blink_heap.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/WebKit.cpp
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp
index c9d49d404ad8e49333113b685361af8bd9e83063..0a90807050379764af44963262add7c2cbab3609 100644
--- a/third_party/WebKit/Source/web/WebKit.cpp
+++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -48,9 +48,8 @@
#include "platform/Logging.h"
#include "platform/RuntimeEnabledFeatures.h"
#include "platform/graphics/ImageDecodingStore.h"
+#include "platform/heap/GCTaskRunner.h"
#include "platform/heap/Heap.h"
-#include "platform/heap/MessageLoopInterruptor.h"
-#include "platform/heap/PendingGCRunner.h"
#include "public/platform/Platform.h"
#include "public/platform/WebPrerenderingSupport.h"
#include "public/platform/WebThread.h"
@@ -100,8 +99,8 @@ private:
} // namespace
-static WebThread::TaskObserver* s_endOfTaskRunner = 0;
-static WebThread::TaskObserver* s_pendingGCRunner = 0;
+static WebThread::TaskObserver* s_endOfTaskRunner = nullptr;
+static GCTaskRunner* s_gcTaskRunner = nullptr;
// Make sure we are not re-initialized in the same address space.
// Doing so may cause hard to reproduce crashes.
@@ -184,12 +183,8 @@ void initializeWithoutV8(Platform* platform)
ThreadState::attachMainThread();
// currentThread() is null if we are running on a thread without a message loop.
if (WebThread* currentThread = platform->currentThread()) {
- ASSERT(!s_pendingGCRunner);
- s_pendingGCRunner = new PendingGCRunner;
- currentThread->addTaskObserver(s_pendingGCRunner);
-
- OwnPtr<MessageLoopInterruptor> interruptor = adoptPtr(new MessageLoopInterruptor(currentThread->taskRunner()));
- ThreadState::current()->addInterruptor(interruptor.release());
+ ASSERT(!s_gcTaskRunner);
+ s_gcTaskRunner = new GCTaskRunner(currentThread);
}
DEFINE_STATIC_LOCAL(ModulesInitializer, initializer, ());
@@ -208,11 +203,11 @@ void shutdown()
// message loop, because the message loop is already destructed before
// the shutdown() is called.
delete s_endOfTaskRunner;
- s_endOfTaskRunner = 0;
+ s_endOfTaskRunner = nullptr;
- ASSERT(s_pendingGCRunner);
- delete s_pendingGCRunner;
- s_pendingGCRunner = 0;
+ ASSERT(s_gcTaskRunner);
+ delete s_gcTaskRunner;
+ s_gcTaskRunner = nullptr;
}
// Shutdown V8-related background threads before V8 is ramped down. Note
« no previous file with comments | « third_party/WebKit/Source/platform/heap/blink_heap.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698