fixup! [Service][UI] Provide sandbox context for each ui servcie app 48/215048/2 accepted/tizen/unified/20191004.003727 submit/tizen/20191002.060847
authorYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 1 Oct 2019 06:47:49 +0000 (23:47 -0700)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 1 Oct 2019 07:11:59 +0000 (00:11 -0700)
This prevents sharing module with launched service apps.

Change-Id: Ibfe6524e74e9122e1fe2264627f943b6a0c6598e
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
wrt_app/src/runtime.js

index f39e244..58d3a71 100755 (executable)
@@ -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 = {};