workers[id].postMessage({ type: 'stop', delay });
}
-let initializeExtensionOnMain = () => {
- initializeExtensionOnMain = () => {};
+let initializeExtensionOnMain = (id: string) => {
+ initializeExtensionOnMain = (id: string) => {};
XWalkExtension.initialize();
// This is workaround solution to make webapis's singleton worker, which has
// same smack label with pid's.
// It must be handled ahead of dropThreadPrivilege()
// Otherwise, smack violation might hanppen from 'libdbuspolicy'.
global.tizen.systeminfo.getPropertyValue("CPU", () => { }, () => { });
- global.tizen.alarm.getAll();
+ if (global['serviceType'] !== 'STANDALONE') {
+ global.tizen.alarm.getAll();
+ } else {
+ let ids = id.split(':');
+ let serviceId = ids[0];
+ let packageId = serviceId.split('.')[0];
+ wrt.security?.dropThreadPrivilege(packageId, serviceId);
+ }
}
export function startService(id: string, filename: string) {
return;
}
console.debug(`startService - ${id}`);
- initializeExtensionOnMain();
- if (global['serviceType'] === 'STANDALONE') {
- let ids = id.split(':');
- let serviceId = ids[0];
- let packageId = serviceId.split('.')[0];
- wrt.security?.dropThreadPrivilege(packageId, serviceId);
- }
+ initializeExtensionOnMain(id);
let startService = `${__dirname}/service_runner.js`;
createWorker(id, startService, filename);
}