Changed configure/makefile to work with v8 package config
[platform/core/uifw/dali-toolkit.git] / plugins / dali-script-v8 / src / dali-wrapper.cpp
index 55df482..1bb2dfc 100644 (file)
@@ -183,7 +183,7 @@ void DaliWrapper::CreateContext( )
   // Context = multiple contexts can exist in a given Isolate, and share data between contexts
   v8::Handle<v8::Context> context  = v8::Context::New( mIsolate, NULL, global);
 
-  mGlobalObjectTemplate.Reset( mIsolate,  global); 
+  mGlobalObjectTemplate.Reset( mIsolate,  global);
 
   mContext.Reset( mIsolate, context);
 }
@@ -192,10 +192,16 @@ void DaliWrapper::Initialize()
 {
   if( !mIsolate )
   {
-    v8::V8::Initialize();
     v8::V8::InitializeICU();
+
+    v8::V8::Initialize();
+
+    // default isolate removed from V8 version 3.27.1 and beyond.
+    mIsolate = v8::Isolate::New();
+    mIsolate->Enter();
+
     v8::V8::SetFatalErrorHandler( FatalErrorCallback );
-    mIsolate = v8::Isolate::GetCurrent();
+
   }
   // if context is null, create it and add dali object to the global object.
   if( mContext.IsEmpty())