1) apply worker.terminate(), instead of process.exit()
2) unload extensions to release extensions
Related chromium-efl patch:
https://review.tizen.org/gerrit/243536
Change-Id: I575fa68d72280d542e36add0d5d7f4f27adb98bc
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Summary: Javascript based Runtime for Tizen
# Version: {TPK_VERSION}.{INTERNAL_API_REVISION}.{WRTJS_VERSION}
# The {INTERNAL_API_REVISION} is used to check compatibility with chromium-efl.
Summary: Javascript based Runtime for Tizen
# Version: {TPK_VERSION}.{INTERNAL_API_REVISION}.{WRTJS_VERSION}
# The {INTERNAL_API_REVISION} is used to check compatibility with chromium-efl.
Release: 1
Group: Web Framework/Web Runtime
License: Apache-2.0
Release: 1
Group: Web Framework/Web Runtime
License: Apache-2.0
export function stopService(id: string) {
console.log(`stopService - ${id}`);
if (isStandalone()) {
export function stopService(id: string) {
console.log(`stopService - ${id}`);
if (isStandalone()) {
- if (runner) {
- runner.stop(id);
+ if (!runner) {
+ console.log('runner instance is null in standalone mode');
+ return;
+ runner.stop(id);
+ setTimeout(() => process.exit(), 500);
+} else {
workers[id].postMessage('stopService');
workers[id].postMessage('stopService');
+ setTimeout(() => {
+ workers[id].terminate();
+ delete workers[id];
+ }, 500);
} catch (e) {
console.log(`exception on stop: ${e}`);
}
} catch (e) {
console.log(`exception on stop: ${e}`);
}
- setTimeout(() => process.exit(), 500);
console.log(`message received : ${msg}`);
if (msg === 'stopService') {
stop(id);
console.log(`message received : ${msg}`);
if (msg === 'stopService') {
stop(id);
+ XWalkExtension.cleanup();
}
export let cleanup = () => {
}
export let cleanup = () => {
+ for (var name in extensions_) {
+ extensions_[name].unloadInstance();
+ }
delete global.tizen;
instance = undefined;
}
delete global.tizen;
instance = undefined;
}