From 4aa199db7a3e67f6ca4964aaecb1791168739afb Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 30 Sep 2019 23:47:49 -0700 Subject: [PATCH] fixup! [Service][UI] Provide sandbox context for each ui servcie app This prevents sharing module with launched service apps. Change-Id: Ibfe6524e74e9122e1fe2264627f943b6a0c6598e Signed-off-by: Youngsoo Choi --- wrt_app/src/runtime.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrt_app/src/runtime.js b/wrt_app/src/runtime.js index f39e244..58d3a71 100755 --- a/wrt_app/src/runtime.js +++ b/wrt_app/src/runtime.js @@ -184,9 +184,10 @@ class Runtime { if (type === 'startService') { if (_this.sandbox[app_id] === undefined) { const fs = require('fs'); + const Module = require('module'); _this.sandbox[app_id] = { console: console, - module: module, + module: new Module, require: require, }; let options = {}; -- 2.7.4