From cba0131267602c7f4830ebb3e083b9da77308a1e Mon Sep 17 00:00:00 2001 From: SangYong Park Date: Thu, 29 Oct 2020 14:41:08 +0900 Subject: [PATCH 01/16] Apply electron v10 Change module path for electron v10 Change-Id: I7f9bc61b2d4b614a10b245a8071bee55a0928bfd Signed-off-by: SangYong Park --- wrt_app/browser/init.ts | 2 +- wrt_app/browser/wrt_web_contents.ts | 6 +++--- wrt_app/renderer/init.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/wrt_app/browser/init.ts b/wrt_app/browser/init.ts index c3b9a54..6bec418 100755 --- a/wrt_app/browser/init.ts +++ b/wrt_app/browser/init.ts @@ -16,4 +16,4 @@ import '../common/init'; import { wrt } from './wrt'; -import (wrt.getElectronPath() + '/browser/init'); +import 'electron/js2c/browser_init'; diff --git a/wrt_app/browser/wrt_web_contents.ts b/wrt_app/browser/wrt_web_contents.ts index 0b35873..38ab268 100644 --- a/wrt_app/browser/wrt_web_contents.ts +++ b/wrt_app/browser/wrt_web_contents.ts @@ -16,10 +16,10 @@ const binding: NativeWRTjs.WRTWebContentsBinding = process.wrtBinding('wrt_web_contents'); const { WRTWebContents } = binding; -const { WebContents: AtomWebContents } = process.wrtBinding('atom_browser_web_contents'); +const { WebContents: ElectronWebContents } = process.wrtBinding('electron_browser_web_contents'); -const parent = AtomWebContents.prototype; -AtomWebContents.prototype = WRTWebContents.prototype; +const parent = ElectronWebContents.prototype; +ElectronWebContents.prototype = WRTWebContents.prototype; Object.setPrototypeOf(WRTWebContents.prototype, parent); diff --git a/wrt_app/renderer/init.ts b/wrt_app/renderer/init.ts index f53c5d1..4451573 100755 --- a/wrt_app/renderer/init.ts +++ b/wrt_app/renderer/init.ts @@ -16,4 +16,4 @@ import '../common/init'; import { wrtRenderer } from './wrt_renderer'; -import (wrtRenderer.getElectronPath() + '/renderer/init'); +import 'electron/js2c/renderer_init'; -- 2.7.4 From 719e2eed6fa5e882b6075d56f78c4e1a6330d378 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Thu, 29 Oct 2020 16:10:52 +0900 Subject: [PATCH 02/16] [Service] Release fake timer when stopService. This fake timer is to avoid unknown uv loop delay issue. It should clear this fake timer after stopService. Change-Id: I320dcdf6d0b0066e560692bdb9c56b3ec9b8352a Signed-off-by: DongHyun Song --- wrt_app/common/service_runner.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index c3c8306..a869101 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -39,6 +39,8 @@ function requestStopService(id: string) { } let app: any = null; +let fakeTimer: any; + export function start(id: string, filename: string) { XWalkExtension.initialize(); XWalkExtension.setRuntimeMessageHandler((type, data) => { @@ -59,7 +61,7 @@ export function start(id: string, filename: string) { // FIXME: this is for awaking up uv loop. // uv loop is sleeping for a few second with tizen webapis's aync callback - setInterval(() => {}, 100); + fakeTimer = setInterval(() => {}, 100); try { app = require(filename); if (app.onStart !== undefined) { @@ -78,6 +80,8 @@ export function start(id: string, filename: string) { } export function stop(id: string) { + if (fakeTimer) + clearInterval(fakeTimer); try { if (app.onStop !== undefined) { app.onStop(); -- 2.7.4 From f93dfc53d1b8626d3204c41113d86497b90f7ad3 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Mon, 2 Nov 2020 16:55:24 +0900 Subject: [PATCH 03/16] [Service] Refactor unload xwalk extension unloadInstance() is introduced for optimizing memory on global model. But with irregular crash problems on UvTaskRunner's OnTimeout function, it try to access xwalk instance after deleted. This patch will remove calling unloadInstance() API. Unloading xwalk extension will be refactored below patch. Related patch: https://review.tizen.org/gerrit/246586/ Change-Id: Ie6a74b815680f02530fd2553427d03bf1634d612 Signed-off-by: DongHyun Song --- wrt_app/common/wrt_xwalk_extension.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/wrt_app/common/wrt_xwalk_extension.ts b/wrt_app/common/wrt_xwalk_extension.ts index f7ba13d..23106e6 100644 --- a/wrt_app/common/wrt_xwalk_extension.ts +++ b/wrt_app/common/wrt_xwalk_extension.ts @@ -220,9 +220,6 @@ export const setRuntimeMessageHandler = (handler: (type: string, data?: string, } export let cleanup = () => { - for (var name in extensions_) { - extensions_[name].unloadInstance(); - } delete global.tizen; instance = undefined; } -- 2.7.4 From 599f7c672443944635f6c56509309cf8294b9955 Mon Sep 17 00:00:00 2001 From: jihwankim Date: Thu, 5 Nov 2020 18:41:15 +0900 Subject: [PATCH 04/16] [DA] Emit 'ready-to-show' instead of call 'show'. Now, to enhance launch speed of web app, DA calls 'mainWindow.show'. But because of this, 'ready-to-show' is now emitted from electron, and this makes malfunction after pause/resume. So, emit 'ready-to-show' to enhance launch speed, not call 'mainwindow.show'. Change-Id: I103b1a4fc8f89ebe8b748f43f45f7979ef9377ef Signed-off-by: jihwankim --- wrt_app/src/runtime.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrt_app/src/runtime.ts b/wrt_app/src/runtime.ts index 928d595..fe6daf6 100644 --- a/wrt_app/src/runtime.ts +++ b/wrt_app/src/runtime.ts @@ -115,7 +115,7 @@ class Runtime { this.webApplication.mainWindow.loadURL(src); this.webApplication.prelaunch(src); if (wrt.da) { - this.webApplication.show(); + this.webApplication.mainWindow.emit('ready-to-show'); } } else { console.log('Handling app-control event'); -- 2.7.4 From 480b6888ff5a0e9fd5983788fc4a98d97e32e217 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 6 Nov 2020 09:48:12 +0900 Subject: [PATCH 05/16] [Service] Terminate worker more gracefully process.exit() in node worker will call Worker::Exit(), which stop the thread asyncronously. So WorkerThreadData is released later after worker's exit event. worker.terminate() in main thread will call Worker::StopThread(), which processes Worker::JoinThread() as well as Worker::Exit(). JoinThread() can defer parent's exit() call after worker's gone. Change-Id: Iad6bd2d64f158e7d6734500a7ab0623d75ad630f Signed-off-by: DongHyun Song --- wrt_app/common/service_manager.ts | 5 +++++ wrt_app/common/service_runner.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index b48f2d4..a6ab24a 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -25,6 +25,11 @@ function createWorker(id: string, startService: string, filename: string) { filename } }); + workers[id].on('message', (message: string) => { + if (message === 'will-terminate') { + workers[id].terminate(); + } + }); workers[id].on('exit', (code: number) => { delete workers[id]; let runningServices = Object.keys(workers).length; diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index a869101..2624f12 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -106,7 +106,7 @@ function run() { stop(id); setTimeout(() => { XWalkExtension.cleanup(); - process.exit() + parentPort?.postMessage("will-terminate"); }, message.delay); } }); -- 2.7.4 From 9153d03dc5406e4e7017edcacdd81fa176d6490d Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Sun, 8 Nov 2020 20:12:31 +0900 Subject: [PATCH 06/16] [Service] Terminate node without process.exit() Node process will be terminated by uv handleres release instead of process.exit(). Related patch: https://review.tizen.org/gerrit/247203/ Change-Id: I24824ed1cc7ed9c055502d29a9008d27fedd3031 Signed-off-by: DongHyun Song --- wrt_app/common/service_manager.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index a6ab24a..757688b 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -34,9 +34,6 @@ function createWorker(id: string, startService: string, filename: string) { delete workers[id]; let runningServices = Object.keys(workers).length; console.log(`exit code(${code}), remain services(${runningServices})`); - if (runningServices === 0 && isServiceApplication()) { - setTimeout(() => process.exit(), 500); - } }); } -- 2.7.4 From 9b0419b99033485731a603ac1bb96d1cc87ea7ee Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 6 Nov 2020 16:55:37 +0900 Subject: [PATCH 07/16] [Service] Prevent multiple calls of wrt.stopService() In case of RakutenTV app, it calls tizen.application...exit() twice. Of course WRTServiceManager::Remove() will skip stopService at the second time, this patch can skip stopService() sequence more early time. Change-Id: I65fdfb13f28834e4093f6be7888054e6aec7162b Signed-off-by: DongHyun Song --- wrt_app/common/service_runner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index 2624f12..1112196 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -34,7 +34,8 @@ function registerExtensionResolver(id: string) { } } -function requestStopService(id: string) { +let requestStopService = (id: string) => { + requestStopService = (id: string) => {}; setTimeout(() => wrt.stopService(id), 500); } -- 2.7.4 From e278331e59d36fe032029f22f5076dced1084a4a Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 6 Nov 2020 09:39:03 +0900 Subject: [PATCH 08/16] [Service][VD] Apply main thread with standalone model With standalone model of service application, this patch will apply main thread service_runner to solve crash problems of node worker. Change-Id: I5fb69368a4bae36ac11d465200b2cd0a42e6c3a1 Signed-off-by: DongHyun Song --- wrt_app/common/service_manager.ts | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index 757688b..14f0a87 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -5,14 +5,15 @@ interface WorkerMap { [id: string]: any; } let workers: WorkerMap = {}; +let runner: any; Object.defineProperty(global, 'serviceType', { value: wrt.getServiceModel(), writable: false }); -function isServiceApplication() { - return global['serviceType'] !== 'UI'; +function isStandalone() { + return global['serviceType'] === 'STANDALONE'; } function createWorker(id: string, startService: string, filename: string) { @@ -48,13 +49,26 @@ function terminateWorker(id: string, delay: number) { export function startService(id: string, filename: string) { console.log(`startService - ${id}`); - let startService = `${__dirname}/service_runner.js`; - createWorker(id, startService, filename); + if (isStandalone()) { + runner = require('../common/service_runner'); + runner.start(id, filename); + } else { + let startService = `${__dirname}/service_runner.js`; + createWorker(id, startService, filename); + } } export function stopService(id: string) { console.log(`stopService - ${id}`); - terminateWorker(id, 500); + if (isStandalone()) { + if (!runner) { + console.log('runner instance is null in standalone mode'); + return; + } + runner.stop(id); + } else { + terminateWorker(id, 500); + } } export function handleBuiltinService(serviceId: string, serviceName: string) { -- 2.7.4 From d55cc7de0b1ddb97a0eb533558fd51edb382763f Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Tue, 13 Oct 2020 02:35:00 -0700 Subject: [PATCH 09/16] [Service] Add edge orchestration interface This provides initial edge orchestration interface. Change-Id: I44df11d7769e9ed692790cd9efd6735a97de94c5 Signed-off-by: Youngsoo Choi --- wrt_app/service/device_api_router.ts | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/wrt_app/service/device_api_router.ts b/wrt_app/service/device_api_router.ts index 7cb70cb..a7e3563 100644 --- a/wrt_app/service/device_api_router.ts +++ b/wrt_app/service/device_api_router.ts @@ -52,9 +52,34 @@ export class DeviceAPIRouter { global.webapis.getPackageId = () => { return this.packageId; } + this.initEdgeWebapis(); this.initProductWebapis(); } + initEdgeWebapis() { + if (wrt['edge'] && !global.webapis.edge) { + let edge = wrt.edge as NativeWRTjs.EdgeExtension; + global.webapis.edge = { + orchestrationGetDevicelist: (service_name: string, exec_type: string) => { + return edge.orchestrationGetDevicelist(service_name, exec_type); + }, + orchestrationReadCapability: (ip: string) => { + return edge.orchestrationReadCapability(ip); + }, + orchestrationRequestService: (app_name: string, self_select: boolean, exec_type: string, exec_parameter: string) => { + return edge.orchestrationRequestService(app_name, self_select, exec_type, exec_parameter); + }, + orchestrationRequestServiceOnDevice: (app_name: string, self_select: boolean, exec_type: string, exec_parameter: string, ip: string) => { + return edge.orchestrationRequestServiceOnDevice(app_name, self_select, exec_type, exec_parameter, ip); + }, + orchestrationWriteCapability: (json: string) => { + return edge.orchestrationWriteCapability(json); + }, + } + Object.defineProperty(global.webapis, 'edge', { writable: false, enumerable: true }); + } + } + initProductWebapis() { // for TV profile if (wrt.tv && !global.webapis.productinfo) { -- 2.7.4 From bb337f18e199a5777a2000bc57372487c967fd35 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Mon, 2 Nov 2020 16:55:24 +0900 Subject: [PATCH 10/16] [Service] Refactor unload xwalk extension unloadInstance() is introduced for optimizing memory on global model. But with irregular crash problems on UvTaskRunner's OnTimeout function, it try to access xwalk instance after deleted. This patch will remove calling unloadInstance() API. Unloading xwalk extension will be refactored below patch. Related patch: https://review.tizen.org/gerrit/246586/ Change-Id: Ie6a74b815680f02530fd2553427d03bf1634d612 Signed-off-by: DongHyun Song (cherry picked from commit f93dfc53d1b8626d3204c41113d86497b90f7ad3) --- wrt_app/common/wrt_xwalk_extension.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/wrt_app/common/wrt_xwalk_extension.ts b/wrt_app/common/wrt_xwalk_extension.ts index f7ba13d..23106e6 100644 --- a/wrt_app/common/wrt_xwalk_extension.ts +++ b/wrt_app/common/wrt_xwalk_extension.ts @@ -220,9 +220,6 @@ export const setRuntimeMessageHandler = (handler: (type: string, data?: string, } export let cleanup = () => { - for (var name in extensions_) { - extensions_[name].unloadInstance(); - } delete global.tizen; instance = undefined; } -- 2.7.4 From 26ba0912aac78eb121373cfe30cd803c96093fd3 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 6 Nov 2020 09:48:12 +0900 Subject: [PATCH 11/16] [Service] Terminate worker more gracefully process.exit() in node worker will call Worker::Exit(), which stop the thread asyncronously. So WorkerThreadData is released later after worker's exit event. worker.terminate() in main thread will call Worker::StopThread(), which processes Worker::JoinThread() as well as Worker::Exit(). JoinThread() can defer parent's exit() call after worker's gone. Change-Id: Iad6bd2d64f158e7d6734500a7ab0623d75ad630f Signed-off-by: DongHyun Song (cherry picked from commit 480b6888ff5a0e9fd5983788fc4a98d97e32e217) --- wrt_app/common/service_manager.ts | 5 +++++ wrt_app/common/service_runner.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index b48f2d4..a6ab24a 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -25,6 +25,11 @@ function createWorker(id: string, startService: string, filename: string) { filename } }); + workers[id].on('message', (message: string) => { + if (message === 'will-terminate') { + workers[id].terminate(); + } + }); workers[id].on('exit', (code: number) => { delete workers[id]; let runningServices = Object.keys(workers).length; diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index c3c8306..3e4b39e 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -102,7 +102,7 @@ function run() { stop(id); setTimeout(() => { XWalkExtension.cleanup(); - process.exit() + parentPort?.postMessage("will-terminate"); }, message.delay); } }); -- 2.7.4 From 27e18430914b56249e3bf8290170067004d65d3c Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Sun, 8 Nov 2020 20:12:31 +0900 Subject: [PATCH 12/16] [Service] Terminate node without process.exit() Node process will be terminated by uv handleres release instead of process.exit(). Related patch: https://review.tizen.org/gerrit/247203/ Change-Id: I24824ed1cc7ed9c055502d29a9008d27fedd3031 Signed-off-by: DongHyun Song (cherry picked from commit 9153d03dc5406e4e7017edcacdd81fa176d6490d) --- wrt_app/common/service_manager.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/wrt_app/common/service_manager.ts b/wrt_app/common/service_manager.ts index b48f2d4..8fcb2e2 100644 --- a/wrt_app/common/service_manager.ts +++ b/wrt_app/common/service_manager.ts @@ -29,9 +29,6 @@ function createWorker(id: string, startService: string, filename: string) { delete workers[id]; let runningServices = Object.keys(workers).length; console.log(`exit code(${code}), remain services(${runningServices})`); - if (runningServices === 0 && isServiceApplication()) { - setTimeout(() => process.exit(), 500); - } }); } -- 2.7.4 From b6973a288994391aa43574138f81fa5faae7153c Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Fri, 6 Nov 2020 16:55:37 +0900 Subject: [PATCH 13/16] [Service] Prevent multiple calls of wrt.stopService() In case of RakutenTV app, it calls tizen.application...exit() twice. Of course WRTServiceManager::Remove() will skip stopService at the second time, this patch can skip stopService() sequence more early time. Change-Id: I65fdfb13f28834e4093f6be7888054e6aec7162b Signed-off-by: DongHyun Song (cherry picked from commit 9b0419b99033485731a603ac1bb96d1cc87ea7ee) --- wrt_app/common/service_runner.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index c3c8306..7825b02 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -34,7 +34,8 @@ function registerExtensionResolver(id: string) { } } -function requestStopService(id: string) { +let requestStopService = (id: string) => { + requestStopService = (id: string) => {}; setTimeout(() => wrt.stopService(id), 500); } -- 2.7.4 From dbae941c9eacebe10473e557fc7f181880e4f0f6 Mon Sep 17 00:00:00 2001 From: DongHyun Song Date: Mon, 16 Nov 2020 14:10:57 +0900 Subject: [PATCH 14/16] [Service] Changes 'DAEMON' to 'GLOBAL' 'global' wrt-service is more common name than 'daemon' Related chromium-efl patch: https://review.tizen.org/gerrit/247741/ Change-Id: I9139832bc0cf4d2ce6a6b916c1e98ba984e4e5ed Signed-off-by: DongHyun Song --- wrt_app/common/service_runner.ts | 2 +- wrt_app/common/wrt_xwalk_extension.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wrt_app/common/service_runner.ts b/wrt_app/common/service_runner.ts index 3118d89..e8b912d 100644 --- a/wrt_app/common/service_runner.ts +++ b/wrt_app/common/service_runner.ts @@ -14,7 +14,7 @@ function isServiceApplication() { } function isGlobalService() { - return global['serviceType'] === 'DAEMON'; + return global['serviceType'] === 'GLOBAL'; } function registerExtensionResolver(id: string) { diff --git a/wrt_app/common/wrt_xwalk_extension.ts b/wrt_app/common/wrt_xwalk_extension.ts index f7ba13d..1204a81 100644 --- a/wrt_app/common/wrt_xwalk_extension.ts +++ b/wrt_app/common/wrt_xwalk_extension.ts @@ -118,7 +118,7 @@ class XWalkExtension { var api = (ext.use_trampoline) ? api_ : global; var extension_api = ext.jsapi; - if (global.serviceType === 'DAEMON' && ext.name === 'xwalk') { + if (global.serviceType === 'GLOBAL' && ext.name === 'xwalk') { console.log(`Delete freeze exports.utils for override method`); extension_api = extension_api.replace('Object.freeze(exports.utils);', ''); extension_api = extension_api.replace('Object.freeze(Utils.prototype);', ''); -- 2.7.4 From fdeb7353ba0fcdb884fecc9983c01107ee25753f Mon Sep 17 00:00:00 2001 From: "jaekuk, lee" Date: Tue, 17 Nov 2020 17:52:55 +0900 Subject: [PATCH 15/16] Don't display splash screen in background mode When launching app in backgroundAtStartup launchMode, prevent splash screen from being displayed. Change-Id: I416fce778e5a001df5a6da855959c88d42ac19f4 Signed-off-by: jaekuk, lee --- wrt_app/src/web_application.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 wrt_app/src/web_application.ts diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts old mode 100644 new mode 100755 index 430a593..8888289 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -285,7 +285,7 @@ export class WebApplication { this.suspended = false; if (this.showTimer) clearTimeout(this.showTimer); - let splashShown = firstLaunch && wrt.showSplashScreen(); + let splashShown = this.preloadStatus !== 'preload' && firstLaunch && wrt.showSplashScreen(); if (!splashShown && !wrt.tv) { this.showTimer = setTimeout(() => { if (!this.suspended) { -- 2.7.4 From 40e496ec570bbf6b9398438261e414cab84e763b Mon Sep 17 00:00:00 2001 From: Surya Kumar Date: Tue, 24 Nov 2020 12:51:23 +0530 Subject: [PATCH 16/16] [M85] Suppress a macOS hack present in electron to gain webview focus A hack used by electron meant for macOS & extended for other platforms contingently is causing behavior difference from XWALK. Since that's the only consumer of 'load-url', removed all event listeners. Focus will anyway be gained by WebContents on their respective show() calls. Fixes P200228-07034 & P200113-07900. Reference: https://review.tizen.org/gerrit/226898 Change-Id: Ife2e6fd54c146596becd5cd00fb86797a9dc6cae Signed-off-by: Surya Kumar --- wrt_app/browser/wrt_window.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wrt_app/browser/wrt_window.ts b/wrt_app/browser/wrt_window.ts index 41c1690..2ac5a14 100644 --- a/wrt_app/browser/wrt_window.ts +++ b/wrt_app/browser/wrt_window.ts @@ -23,6 +23,9 @@ Object.setPrototypeOf(WRTWindow.prototype, BrowserWindow.prototype); WRTWindow.prototype._init = function () { (BrowserWindow.prototype as any)._init.call(this); + // This removes a macOS specific hack present in electron + // that causes side effects on Tizen + this.webContents.removeAllListeners('load-url'); if (typeof this.setup === 'function') this.setup(); this.constructor = BrowserWindow; -- 2.7.4