From abbfba6a5b41001b832ec1ab2f01d4152a9b5fc3 Mon Sep 17 00:00:00 2001 From: Zbigniew Kostrzewa Date: Fri, 14 Jun 2013 13:32:58 +0200 Subject: [PATCH 1/1] [Release] wrt_0.8.227 Change-Id: Ibb6e97d27396cdf2120c915629705f299d4e70cd --- packaging/wrt.spec | 2 +- src/api_new/ewk_context_manager.cpp | 17 +++++++---------- .../webkit/injected-bundle/wrt-injected-bundle.cpp | 18 +++++++++++++++--- 3 files changed, 23 insertions(+), 14 deletions(-) diff --git a/packaging/wrt.spec b/packaging/wrt.spec index d217b2d..8550da7 100644 --- a/packaging/wrt.spec +++ b/packaging/wrt.spec @@ -1,7 +1,7 @@ #git:framework/web/wrt Name: wrt Summary: web runtime -Version: 0.8.226 +Version: 0.8.227 Release: 1 Group: Development/Libraries License: Apache License, Version 2.0 diff --git a/src/api_new/ewk_context_manager.cpp b/src/api_new/ewk_context_manager.cpp index 7e9a049..9d3db72 100644 --- a/src/api_new/ewk_context_manager.cpp +++ b/src/api_new/ewk_context_manager.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include "ewk_context_manager.h" @@ -38,12 +39,6 @@ namespace WRT { static const std::string bundlePath("/usr/lib/libwrt-injected-bundle.so"); static const std::string caCertPath("/opt/usr/share/certs/ca-certificate.crt"); -#ifdef __arm__ -const std::string plugins_arch = "plugins/arm"; -#else -const std::string plugins_arch = "plugins/x86"; -#endif - EwkContextManager::EwkContextManager( const std::string& tizenAppId, Ewk_Context* ewkContext, @@ -138,12 +133,14 @@ bool EwkContextManager::initialize() // ewk storage_path set ewk_context_storage_path_reset(m_ewkContext); + std::string pluginsPath = + WrtDB::WidgetConfig::GetWidgetNPRuntimePluginsPath( + dao.getTizenPkgId()); + // npruntime plugins path set - std::ostringstream plugins_path; - plugins_path << dao.getPath() << plugins_arch; - LogInfo("ewk_context_additional_plugin_path_set() : " << plugins_path.str()); + LogInfo("ewk_context_additional_plugin_path_set() : " << pluginsPath); - ewk_context_additional_plugin_path_set(m_ewkContext, plugins_path.str().c_str()); + ewk_context_additional_plugin_path_set(m_ewkContext, pluginsPath.c_str()); m_initialized = true; diff --git a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp index 2726d5a..705c0c8 100644 --- a/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp +++ b/src/view/webkit/injected-bundle/wrt-injected-bundle.cpp @@ -105,9 +105,15 @@ Bundle::Bundle(WKBundleRef bundle) : m_initialized(false), m_decryptionSupport(new InjectedBundle::DecryptionSupport()) { - LOG_PROFILE_START("Bundle attachToThread"); - WrtDB::WrtDatabase::attachToThreadRO(); - LOG_PROFILE_STOP("Bundle attachToThread"); + Try { + LOG_PROFILE_START("Bundle attachToThread"); + WrtDB::WrtDatabase::attachToThreadRO(); + LOG_PROFILE_STOP("Bundle attachToThread"); + } Catch (DPL::DB::SqlConnection::Exception::Base) { + LogError("## Db attach was failed! Terminate WebProcess by force. ##"); + exit(-1); + } + #ifdef MULTIPROCESS_SERVICE_SUPPORT_INLINE sendWebProcessPid(); #endif @@ -158,6 +164,12 @@ void Bundle::willDestroyPageCallback( void Bundle::didCreatePage(WKBundlePageRef page) { + if (!m_initialized) + { + LogError("## Injected-bundle was not initialized! Terminate WebProcess by force. ##"); + exit(-1); + } + auto mainFrame = WKBundlePageGetMainFrame(page); auto context = WKBundleFrameGetJavaScriptContext(mainFrame); m_pagesList.push_back(page); -- 2.7.4