diff options
author | sung-su.kim <sung-su.kim@samsung.com> | 2013-10-15 14:00:15 +0900 |
---|---|---|
committer | sung-su.kim <sung-su.kim@samsung.com> | 2013-10-15 14:00:25 +0900 |
commit | 219317f8425490d8ae904d2fb6a44d41772565c1 (patch) | |
tree | 24f916366b58359f20a89cf8fc41466b2661464e | |
parent | 9f85ae041fb24f898779ffa0715602645b9bc694 (diff) | |
parent | ec3cca7155764646c2d6026cb6028ef4f4075ac3 (diff) | |
download | web-provider-219317f8425490d8ae904d2fb6a44d41772565c1.tar.gz web-provider-219317f8425490d8ae904d2fb6a44d41772565c1.tar.bz2 web-provider-219317f8425490d8ae904d2fb6a44d41772565c1.zip |
[Release] livebox.web-provider-1.60
Merge branch 'master' into tizen_2.2
Change-Id: Ic0bfe5ad887f3c1922ffcdc0a3fa27519a1e1c8d
-rwxr-xr-x | packaging/livebox.web-provider.spec | 3 | ||||
-rwxr-xr-x | src/Daemon/BoxDaemonImpl.cpp | 2 | ||||
-rwxr-xr-x | src/Daemon/main.cpp | 35 | ||||
-rwxr-xr-x | src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp | 9 |
4 files changed, 37 insertions, 12 deletions
diff --git a/packaging/livebox.web-provider.spec b/packaging/livebox.web-provider.spec index 0a5aa5e..2d46d97 100755 --- a/packaging/livebox.web-provider.spec +++ b/packaging/livebox.web-provider.spec @@ -1,11 +1,12 @@ #git:framework/web/web-provider Name: livebox.web-provider Summary: web framework for livebox -Version: 1.59 +Version: 1.60 Release: 1 Group: main/app License: Flora License, Version 1.1 Source0: %{name}-%{version}.tar.gz +BuildRequires: attr BuildRequires: cmake, gettext-tools BuildRequires: libcap, libcap-devel BuildRequires: pkgconfig(ail) diff --git a/src/Daemon/BoxDaemonImpl.cpp b/src/Daemon/BoxDaemonImpl.cpp index 88356f6..22d7695 100755 --- a/src/Daemon/BoxDaemonImpl.cpp +++ b/src/Daemon/BoxDaemonImpl.cpp @@ -724,7 +724,7 @@ int BoxDaemonImpl::requestLowMemoryCallback(void* data) UNUSED_PARAM(data); // terminate box daemon and revive - elm_exit(); + aul_terminate_pid(getpid()); return 0; } diff --git a/src/Daemon/main.cpp b/src/Daemon/main.cpp index 765b499..e3d144a 100755 --- a/src/Daemon/main.cpp +++ b/src/Daemon/main.cpp @@ -29,6 +29,23 @@ #include <Core/Util/Util.h> #include "BoxDaemon.h" + +// declarations +static BoxDaemon boxDaemon; +static bool isDaemonReleased = false; + +static void atExitCallback() +{ + LogD("enter"); + if (isDaemonReleased) { + return; + } + + // this callback is called due to abnormal exit() + LogD("release daemon resources explicitly"); + boxDaemon.stop(); +} + static bool appCreateCallback(void *data) { LogD("app create"); @@ -40,8 +57,9 @@ static bool appCreateCallback(void *data) static void appTerminateCallback(void *data) { - BoxDaemon *daemon = static_cast<BoxDaemon *>(data); - daemon->stop(); + BoxDaemon *boxDaemon = static_cast<BoxDaemon *>(data); + boxDaemon->stop(); + isDaemonReleased = true; } static void appPauseCallback(void *data) @@ -61,18 +79,21 @@ static void appServiceCallback(service_h service, void *data) int ret; char* name; - BoxDaemon *daemon = static_cast<BoxDaemon*>(data); + BoxDaemon *boxDaemon = static_cast<BoxDaemon*>(data); ret = service_get_extra_data(service, "name", &name); + + // check if web-provider is launched, or not if (ret == SERVICE_ERROR_NONE) { std::string daemonName(name); - if(!(daemon->start(daemonName))) { + if(!(boxDaemon->start(daemonName))) { LogD("daemon failed to start"); aul_terminate_pid(getpid()); } + atexit(atExitCallback); return; } - daemon->handleAppService(service); + boxDaemon->handleAppService(service); } static bool grantProcessCapability() @@ -126,8 +147,6 @@ int main (int argc, char *argv[]) // set the appcore callbacks app_event_callback_s ops; memset(&ops, 0x00, sizeof(app_event_callback_s)); - BoxDaemon daemon; - ops.create = appCreateCallback; ops.terminate = appTerminateCallback; ops.pause = appPauseCallback; @@ -135,6 +154,6 @@ int main (int argc, char *argv[]) ops.service = appServiceCallback; // start appcore - int ret = app_efl_main(&argc, &argv, &ops, &daemon); + int ret = app_efl_main(&argc, &argv, &ops, &boxDaemon); return ret; } diff --git a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp index 91f2d1d..ad396da 100755 --- a/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp +++ b/src/Plugin/AppBoxPlugin/AppBoxRenderView.cpp @@ -17,9 +17,12 @@ * @file AppBoxRenderView.cpp * @author Yunchan Cho (yunchan.cho@samsung.com) */ +#include <sys/types.h> +#include <unistd.h> #include <string> #include <fstream> #include <streambuf> +#include <aul.h> #include <Eina.h> #include <Evas.h> #include <Ecore.h> @@ -294,6 +297,9 @@ void AppBoxRenderView::hidePd() } m_pdHelper->close(); m_pdHelper.reset(); + + // start timer for clearing existing snapshot in case of only pd open + addTimer(&m_fireRenderTimer, RENDER_MAX_TIME, fireRenderTimerCallback); } Evas_Object* AppBoxRenderView::getBoxWebView() @@ -631,8 +637,7 @@ void AppBoxRenderView::decideNavigationCallback(Evas_Object* webview, std::strin void AppBoxRenderView::crashWebProcessCallback() { LogD("enter"); - ewk_shutdown(); - elm_exit(); + aul_terminate_pid(getpid()); } void AppBoxRenderView::loadNonEmptyLayoutFinishedCallback( |