summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunchan Cho <yunchan.cho@samsung.com>2013-09-30 21:00:19 +0900
committerYunchan Cho <yunchan.cho@samsung.com>2013-09-30 22:20:06 +0900
commit41e4b865f72f2aee00c72eb0b6e98aa893083be6 (patch)
tree6b89c198b8af96a6aa79d474fe57fa037b631f3e
parent0aeddb02cdef04eb4d12e05b57560ad2cb5bb95e (diff)
downloadweb-provider-41e4b865f72f2aee00c72eb0b6e98aa893083be6.tar.gz
web-provider-41e4b865f72f2aee00c72eb0b6e98aa893083be6.tar.bz2
web-provider-41e4b865f72f2aee00c72eb0b6e98aa893083be6.zip
Unset env variables for webkit process path explicitly
[Issue#] N/A [Problem] If AppBoxManager doesn't unset the followings variables, ewk context in other web-provider plugins like pwl, webclip doesn't work well. WEB_PROCESS_EXECUTABLE_PATH, PLUGIN_PROCESS_EXECUTABLE_PATH [Cause] all web-provider plugins are executed on same UI Process. So env variables set by a plugin can affect to other web-provider plugins. [Solution] the env variables above are only used by app box plugin. So AppBoxManager unset them as soon as it creates an ewk context. Change-Id: I0e4d657a410a31bab1cebdf47f223b4813261e97
-rwxr-xr-xsrc/Plugin/AppBoxPlugin/AppBoxManager.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Plugin/AppBoxPlugin/AppBoxManager.cpp b/src/Plugin/AppBoxPlugin/AppBoxManager.cpp
index 04846eb..6285b5c 100755
--- a/src/Plugin/AppBoxPlugin/AppBoxManager.cpp
+++ b/src/Plugin/AppBoxPlugin/AppBoxManager.cpp
@@ -105,9 +105,15 @@ EwkContextPtr AppBoxManager::getAvailableEwkContext(const std::string& appId)
setenv("WEB_PROCESS_EXECUTABLE_PATH", webProcessPath.c_str(), 1);
setenv("PLUGIN_PROCESS_EXECUTABLE_PATH", pluginProcessPath.c_str(), 1);
- return EwkContextPtr(
+ EwkContextPtr newEwkContext(
ewk_context_new_with_injected_bundle_path(bundlePath.c_str()),
BoxManager::EwkContextDeleter());
+
+ // unset the following env variables not to affect other ewk context creation
+ unsetenv("WEB_PROCESS_EXECUTABLE_PATH");
+ unsetenv("PLUGIN_PROCESS_EXECUTABLE_PATH");
+
+ return newEwkContext;
}
void AppBoxManager::insertContextMap(std::string& appId, EwkContextPtr ewkContext)