Merge "Fix resource leaks in layouting." into devel/master
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / scripting / script-impl.cpp
index 8b08f99..6c9191b 100644 (file)
@@ -33,28 +33,18 @@ namespace Internal
 
 namespace
 {
+#if _GLIBCXX_USE_CXX11_ABI
+const char* PLUGIN_FILE = "libdali-script-plugin-v8-cxx11.so";
+#else
 const char* PLUGIN_FILE = "libdali-script-plugin-v8.so";
+#endif
 }
 
-void Script::ExecuteFile( const std::string& filename )
-{
-  if( mPlugin )
-  {
-    mPlugin->ExecuteFile(filename);
-  }
-}
-
-Script::Script(void) : mPlugin(NULL)
+Script::Script()
+: mPlugin( NULL )
 {
   ScriptPluginProxy *plugin = new ScriptPluginProxy( PLUGIN_FILE );
 
-  if( mPlugin )
-  {
-    DALI_LOG_WARNING("Reloading script plugin %s, is this what you wanted to do?",PLUGIN_FILE);
-    delete mPlugin;
-    mPlugin = NULL;
-  }
-
   if( plugin->IsInitialized() )
   {
     mPlugin = plugin;
@@ -63,7 +53,15 @@ Script::Script(void) : mPlugin(NULL)
   {
     delete plugin;
   }
+}
 
+bool Script::ExecuteFile( const std::string& filename )
+{
+  if( mPlugin )
+  {
+    return mPlugin->ExecuteFile(filename);
+  }
+  return false;
 }
 
 Script::~Script()