From: Taejeong Lee Date: Mon, 8 Apr 2013 13:16:54 +0000 (+0900) Subject: W3C extension feature bug fix X-Git-Tag: submit/tizen_2.2/20130927.091410^2~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7a8d946f5b635489c4261decda76a7a303f55de;p=platform%2Fframework%2Fweb%2Fwrt-plugins-common.git W3C extension feature bug fix [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 --- diff --git a/src/plugin-loading/js_page_session.cpp b/src/plugin-loading/js_page_session.cpp index bc9d44f..8b2f7ab 100644 --- a/src/plugin-loading/js_page_session.cpp +++ b/src/plugin-loading/js_page_session.cpp @@ -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()); diff --git a/src/plugin-loading/plugin_container_support.cpp b/src/plugin-loading/plugin_container_support.cpp index 41effcf..7eabd46 100644 --- a/src/plugin-loading/plugin_container_support.cpp +++ b/src/plugin-loading/plugin_container_support.cpp @@ -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