Reply to javascript dialog when exiting by command |pkgcmd| 58/108058/5 accepted/tizen/3.0.m2/mobile/20170105.023704 accepted/tizen/3.0.m2/tv/20170105.024023 accepted/tizen/3.0.m2/wearable/20170105.024330 accepted/tizen/3.0/common/20170103.172759 accepted/tizen/3.0/ivi/20170103.154741 accepted/tizen/3.0/mobile/20170103.154652 accepted/tizen/3.0/tv/20170103.154709 accepted/tizen/3.0/wearable/20170103.154727 submit/tizen_3.0.m2/20170104.093752 submit/tizen_3.0/20170103.043100
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 3 Jan 2017 04:10:51 +0000 (13:10 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 3 Jan 2017 04:10:51 +0000 (13:10 +0900)
There's an issue not to kill web app when javascript dialog is opened
even if the command |pkgcmd -k -n <pkgid>| is executed to kill the web app.
To prevent the issue, this CL replies to the dialog to close it
right before the termination.

Bug: TSAM-11809, TSAM-11813
Url: http://suprem.sec.samsung.net/jira/browse/TSAM-11809
Url: http://suprem.sec.samsung.net/jira/browse/TSAM-11813

Change-Id: I4757f45b3731d25cb57876f12c7b2e52b9f62af7
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
runtime/browser/web_application.cc

index 753711a6f1ee52e4f892073a0b1ff64c696698c2..856c8abcc51acb8018c07222def9765d8171783a 100755 (executable)
@@ -660,6 +660,7 @@ void WebApplication::ClosePageFromOnTerminate() {
   if (it != view_stack_.end()) {
     runtime::Runtime::is_on_terminate_called = true;
     for (; it != view_stack_.end(); ++it) {
+      (*it)->ReplyToJavascriptDialog();
       view_stack_.front()->SetVisibility(false);
       ewk_view_page_close((*it)->evas_object());
     }