From e7a8d946f5b635489c4261decda76a7a303f55de Mon Sep 17 00:00:00 2001 From: Taejeong Lee Date: Mon, 8 Apr 2013 22:16:54 +0900 Subject: [PATCH] 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 --- src/plugin-loading/js_page_session.cpp | 9 ++++++++- src/plugin-loading/plugin_container_support.cpp | 15 ++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) 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 -- 2.7.4