W3C extension feature bug fix
authorTaejeong Lee <taejeong.lee@samsung.com>
Mon, 8 Apr 2013 13:16:54 +0000 (22:16 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Mon, 8 Apr 2013 14:00:57 +0000 (23:00 +0900)
[Issue#] N/A
[Problem] A crash occurs when try to get plugin handle about W3C extension feature.
[Cause] W3C extension feature exception handling fault.
[Solution] Exception handling routine was added.

Change-Id: Iabc8a7e7e01fd6b50413a584d5d857b4eb08e2cf

src/plugin-loading/js_page_session.cpp
src/plugin-loading/plugin_container_support.cpp

index bc9d44f..8b2f7ab 100644 (file)
@@ -230,7 +230,14 @@ void JSPageSession::Impl::installRequestedFeatures()
     {
         LogDebug("Processing feature: " << *feature);
 
-        auto plugin = m_pluginsSupport->getPluginForFeature(*feature);
+        PluginModelPtr plugin = m_pluginsSupport->getPluginForFeature(*feature);
+
+        if (!plugin)
+        {
+            LogDebug("It didn't have plugins! : " << *feature);
+            continue;
+        }
+
         ImplementedObjectsList implObjs =
             PluginDAOReadOnly::
                 getImplementedObjectsForPluginHandle(plugin->Handle.Get());
index 41effcf..7eabd46 100644 (file)
@@ -228,11 +228,16 @@ PluginContainerSupport::getPluginModelById(DbPluginHandle handle) const
 PluginModelPtr
 PluginContainerSupport::getPluginModel(const FeatureModelPtr &feature) const
 {
-    LogDebug("");
-    Assert(feature && "Null Ptr for feature model");
-    LogDebug("Feature located in plugin: " << feature->PHandle.Get());
-
-    return getPluginModelById(feature->PHandle.Get());
+    if (!feature)
+    {
+        LogDebug("Null Ptr for feature model");
+        return PluginModelPtr();
+    }
+    else
+    {
+        LogDebug("Feature located in plugin: " << feature->PHandle.Get());
+        return getPluginModelById(feature->PHandle.Get());
+    }
 }
 
  PluginContainerSupport::PluginsList