From 122570b9685d3e32ee2c4d380be611939ccadba6 Mon Sep 17 00:00:00 2001 From: SangYong Park Date: Thu, 19 May 2022 16:04:55 +0900 Subject: [PATCH] Prevent creating script context for electron isolation feature Electron has script isolation feature, and it is enabled by default. Script isolation feature create new script context. wrtjs does not need script isolation, so turn off it for memory. Change-Id: I77d9fd97e8ee874a328f2e24c7a081c17cbf940b Signed-off-by: SangYong Park --- wrt_app/src/web_application.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/wrt_app/src/web_application.ts b/wrt_app/src/web_application.ts index 1f55332..4c025c7 100644 --- a/wrt_app/src/web_application.ts +++ b/wrt_app/src/web_application.ts @@ -173,6 +173,7 @@ export class WebApplication { transparent: this.defaultTransparent, show: false, webPreferences: { + contextIsolation: options.isAddonAvailable, nodeIntegration: options.isAddonAvailable, nodeIntegrationInSubFrames: options.isAddonAvailable, nodeIntegrationInWorker: false, -- 2.7.4