Preloading plugin so file was changed to work only for root object.
authorTaejeong Lee <taejeong.lee@samsung.com>
Wed, 30 Jan 2013 11:55:53 +0000 (20:55 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Wed, 30 Jan 2013 14:16:55 +0000 (23:16 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Preloading plugin so file was changed to work only for root object.

Change-Id: If0b045e122e3d65ed3c3560499dc969304a181ca

src/plugin-loading/plugin.cpp
src/plugin-loading/plugin_logic.cpp

index 9ab4518..8cd72f5 100644 (file)
@@ -59,10 +59,10 @@ PluginPtr Plugin::LoadFromFile(const std::string& fileName)
 {
     LogDebug("LoadFromFile" << fileName);
 
-    LogDebug("Loading plugin: " << fileName);
-
     void *dllHandle;
-    dllHandle = dlopen(fileName.c_str(), RTLD_NOW);
+    dllHandle = dlopen(fileName.c_str(), RTLD_LAZY);
+
+    LogDebug("dlopen() done!");
 
     if (dllHandle == NULL) {
         LogError(
index 5fb5d70..ee01b63 100644 (file)
@@ -250,6 +250,13 @@ void PluginLogic::Impl::initSession(int widgetHandle)
     FOREACH(it, pluginList)
     {
         PluginModelPtr& pluginModel = *it;
+
+        if (!pluginModel->LibraryDependencies.Get()->empty())
+        {
+            // Only Root Object
+            continue;
+        }
+
         PluginPtr pluginLib = pluginModel->LibraryInstance.Get();
 
         if (!pluginLib)