[Release] wrt_0.8.227
authorZbigniew Kostrzewa <z.kostrzewa@samsung.com>
Fri, 14 Jun 2013 11:32:58 +0000 (13:32 +0200)
committerHoseon LEE <hoseon46.lee@samsung.com>
Sun, 29 Sep 2013 05:35:28 +0000 (14:35 +0900)
Change-Id: Ibb6e97d27396cdf2120c915629705f299d4e70cd

packaging/wrt.spec
src/api_new/ewk_context_manager.cpp
src/view/webkit/injected-bundle/wrt-injected-bundle.cpp

index d217b2d..8550da7 100644 (file)
@@ -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
index 7e9a049..9d3db72 100644 (file)
@@ -30,6 +30,7 @@
 #include <i_view_module.h>
 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
 #include <dpl/wrt-dao-ro/widget_dao_types.h>
+#include <dpl/wrt-dao-ro/widget_config.h>
 #include <dpl/utils/wrt_global_settings.h>
 #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;
 
index 2726d5a..705c0c8 100644 (file)
@@ -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);