} // namespace
static WebThread::TaskObserver* s_endOfTaskRunner = 0;
-#if ENABLE(OILPAN)
static WebThread::TaskObserver* s_pendingGCRunner = 0;
static WebCore::ThreadState::Interruptor* s_messageLoopInterruptor = 0;
static WebCore::ThreadState::Interruptor* s_isolateInterruptor = 0;
-#endif
// Make sure we are not re-initialized in the same address space.
// Doing so may cause hard to reproduce crashes.
v8::V8::SetEntropySource(&generateEntropy);
v8::V8::SetArrayBufferAllocator(WebCore::v8ArrayBufferAllocator());
v8::V8::Initialize();
- WebCore::setMainThreadIsolate(isolate);
WebCore::V8PerIsolateData::ensureInitialized(isolate);
-#if ENABLE(OILPAN)
s_isolateInterruptor = new WebCore::V8IsolateInterruptor(v8::Isolate::GetCurrent());
WebCore::ThreadState::current()->addInterruptor(s_isolateInterruptor);
-#endif
// currentThread will always be non-null in production, but can be null in Chromium unit tests.
if (WebThread* currentThread = platform->currentThread()) {
v8::Isolate* mainThreadIsolate()
{
- return WebCore::mainThreadIsolate();
+ return WebCore::V8PerIsolateData::mainThreadIsolate();
}
static double currentTimeFunction()
WTF::setRandomSource(cryptographicallyRandomValues);
WTF::initialize(currentTimeFunction, monotonicallyIncreasingTimeFunction);
WTF::initializeMainThread(callOnMainThreadFunction);
-#if ENABLE(OILPAN)
WebCore::Heap::init();
if (WebThread* currentThread = platform->currentThread()) {
ASSERT(!s_pendingGCRunner);
s_messageLoopInterruptor = new WebCore::MessageLoopInterruptor(currentThread);
WebCore::ThreadState::current()->addInterruptor(s_messageLoopInterruptor);
}
-#endif
WebCore::init();
WebCore::ImageDecodingStore::initializeOnce();
s_endOfTaskRunner = 0;
}
-#if ENABLE(OILPAN)
ASSERT(s_isolateInterruptor);
WebCore::ThreadState::current()->removeInterruptor(s_isolateInterruptor);
-#endif
- WebCore::V8PerIsolateData::dispose(WebCore::mainThreadIsolate());
- WebCore::setMainThreadIsolate(0);
+ WebCore::V8PerIsolateData::dispose(WebCore::V8PerIsolateData::mainThreadIsolate());
v8::V8::Dispose();
shutdownWithoutV8();
ASSERT(!s_endOfTaskRunner);
WebCore::ImageDecodingStore::shutdown();
WebCore::shutdown();
-#if ENABLE(OILPAN)
if (Platform::current()->currentThread()) {
ASSERT(s_pendingGCRunner);
delete s_pendingGCRunner;
s_messageLoopInterruptor = 0;
}
WebCore::Heap::shutdown();
-#endif
WTF::shutdown();
Platform::shutdown();
WebPrerenderingSupport::shutdown();