| Index: Source/web/WebKit.cpp
|
| diff --git a/Source/web/WebKit.cpp b/Source/web/WebKit.cpp
|
| index 754c02d3b4a8a5ec003bdbcd31814a0add333528..47d9dbeb441b202e573731c05b4a9292683436ec 100644
|
| --- a/Source/web/WebKit.cpp
|
| +++ b/Source/web/WebKit.cpp
|
| @@ -42,6 +42,7 @@
|
| #include "core/page/Page.h"
|
| #include "core/frame/Settings.h"
|
| #include "core/workers/WorkerGlobalScopeProxy.h"
|
| +#include "gin/public/v8_platform.h"
|
| #include "platform/LayoutTestSupport.h"
|
| #include "platform/Logging.h"
|
| #include "platform/graphics/ImageDecodingStore.h"
|
| @@ -104,7 +105,9 @@ void initialize(Platform* platform)
|
| {
|
| initializeWithoutV8(platform);
|
|
|
| - v8::Isolate* isolate = v8::Isolate::GetCurrent();
|
| + v8::V8::InitializePlatform(gin::V8Platform::Get());
|
| + v8::Isolate* isolate = v8::Isolate::New();
|
| + isolate->Enter();
|
| WebCore::V8Initializer::initializeMainThreadIfNeeded(isolate);
|
| v8::V8::SetEntropySource(&generateEntropy);
|
| v8::V8::SetArrayBufferAllocator(WebCore::v8ArrayBufferAllocator());
|
| @@ -205,9 +208,11 @@ void shutdown()
|
|
|
| ASSERT(s_isolateInterruptor);
|
| WebCore::ThreadState::current()->removeInterruptor(s_isolateInterruptor);
|
| + v8::Isolate* isolate = WebCore::V8PerIsolateData::mainThreadIsolate();
|
|
|
| - WebCore::V8PerIsolateData::dispose(WebCore::V8PerIsolateData::mainThreadIsolate());
|
| - v8::V8::Dispose();
|
| + WebCore::V8PerIsolateData::dispose(isolate);
|
| + isolate->Exit();
|
| + isolate->Dispose();
|
|
|
| shutdownWithoutV8();
|
| }
|
|
|