Fix crash issue by app-control 49/199549/1
authorSangYong Park <sy302.park@samsung.com>
Wed, 13 Feb 2019 02:31:06 +0000 (11:31 +0900)
committerSangYong Park <sy302.park@samsung.com>
Wed, 13 Feb 2019 02:31:06 +0000 (11:31 +0900)
Currently reset web application when app-control event occurs after web application is created.
but, this is not correct behavior and sometimes crash is occured.
so ignore this case, and fix behavior after app-control event object is provided in app-control event.

Change-Id: Ife0c8b01dfa13ba99ea3bc405fd854a9db3e7610
Signed-off-by: SangYong Park <sy302.park@samsung.com>
wrt_app/src/runtime.js

index 4a50762baa8514831b1ca998b65061cbdf211e2d..6b84b64c28c95336677afa91a02df5afa6675346 100755 (executable)
@@ -79,9 +79,9 @@ class Runtime {
         wrt.on('app-control', function() {
             console.log('app-control');
             if (_this.webApplication) {
-                console.log("Close current app");
-                _this.webApplication.close();
-                _this.webApplication = null;
+                // TODO: Reset application or emit appcontrol event
+                console.log("application is already created");
+                return;
             }
 
             if (wrt.isElectronApp()) {