| Index: Source/web/WebKit.cpp
|
| diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
|
| index 370d6141528c28f16bf3a834d136dc11e9b2cf0f..9411f97e35f2895436dc35c9887cec99e90d655c 100644
|
| --- a/Source/web/WebKit.cpp
|
| +++ b/Source/web/WebKit.cpp
|
| @@ -92,29 +92,13 @@ static ThreadState::Interruptor* s_isolateInterruptor = 0;
|
| // Doing so may cause hard to reproduce crashes.
|
| static bool s_webKitInitialized = false;
|
|
|
| -static bool generateEntropy(unsigned char* buffer, size_t length)
|
| -{
|
| - if (Platform::current()) {
|
| - Platform::current()->cryptographicallyRandomValues(buffer, length);
|
| - return true;
|
| - }
|
| - return false;
|
| -}
|
| -
|
| void initialize(Platform* platform)
|
| {
|
| initializeWithoutV8(platform);
|
|
|
| - v8::V8::InitializePlatform(gin::V8Platform::Get());
|
| - v8::Isolate* isolate = v8::Isolate::New();
|
| - isolate->Enter();
|
| - V8Initializer::initializeMainThreadIfNeeded(isolate);
|
| - v8::V8::SetEntropySource(&generateEntropy);
|
| - v8::V8::SetArrayBufferAllocator(v8ArrayBufferAllocator());
|
| - v8::V8::Initialize();
|
| - V8PerIsolateData::ensureInitialized(isolate);
|
| + V8Initializer::initializeMainThreadIfNeeded();
|
|
|
| - s_isolateInterruptor = new V8IsolateInterruptor(v8::Isolate::GetCurrent());
|
| + s_isolateInterruptor = new V8IsolateInterruptor(V8PerIsolateData::mainThreadIsolate());
|
| ThreadState::current()->addInterruptor(s_isolateInterruptor);
|
|
|
| // currentThread will always be non-null in production, but can be null in Chromium unit tests.
|
| @@ -224,8 +208,6 @@ void shutdown()
|
|
|
| v8::Isolate* isolate = V8PerIsolateData::mainThreadIsolate();
|
| V8PerIsolateData::dispose(isolate);
|
| - isolate->Exit();
|
| - isolate->Dispose();
|
|
|
| shutdownWithoutV8();
|
| }
|
|
|