Surya Kumar [Thu, 4 May 2023 12:37:41 +0000 (18:07 +0530)]
Avoid "Object has been destroyed" JS error
It's possible mainWindow would be destroyed during suspend,
but addonManager tries to access it without checking it
leading to JS crash. This change fixes it.
Change-Id: Ifbb65e13e290474b7628bc02ccac36a51f8bb367
Signed-off-by: Surya Kumar <surya.kumar7@samsung.com>
liwei [Tue, 22 Jun 2021 09:03:59 +0000 (17:03 +0800)]
Skip logic of check firstrender in resume
Resume() is invoked after window show, and window show is
called in "ready-to-show", in "ready-to-show" event,
firstrender has been set to true, so check firstrender
logic can be skipped in resume.
Change-Id: Ifde64c05dc8a89cdba4467fb214f531860926f83
Signed-off-by: liwei <wei90727.li@samsung.com>
SangYong Park [Wed, 16 Jun 2021 08:26:12 +0000 (17:26 +0900)]
Fix finalize code
'quit' of app and 'closed' of BrowserWindow emit order is changed.
so, fix code that has dependency to remained BrowserWindow.
Reference:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/259880/
Change-Id: Ib988f230822c94becbf1d735f82fe85b22250f66
Signed-off-by: SangYong Park <sy302.park@samsung.com>
SangYong Park [Fri, 4 Dec 2020 04:55:37 +0000 (13:55 +0900)]
Using native window open
window.open uses electron js logic when renderer was integrated with node.
(node is integrated in renderer when addon is enabled. and default webapp
do not use node in renderer side.). It has some compatibility issue.
so, use native window open always.
Cherry picked from latest tizen branch wrtjs for backward compatibility.
https://review.tizen.org/gerrit/#/c/platform/framework/web/wrtjs/+/248995/
Change-Id: I8d786b2d9d1ba97796217f0b2cb2371e89b80479
Signed-off-by: SangYong Park <sy302.park@samsung.com>
Signed-off-by: ws29.jung <ws29.jung@samsung.com>
Bot Blink [Fri, 7 May 2021 06:19:16 +0000 (06:19 +0000)]
Merge "[Service] call onRequest() when app launched again" into tizen_6.0
DongHyun Song [Thu, 6 May 2021 08:32:45 +0000 (17:32 +0900)]
[Service] call onRequest() when app launched again
When the app launched again, onRequest() event will
be called to handle different appcontrol data.
Change-Id: Ia80a6cfd8489318f9b7f42720209d79d76f375ae
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
SangYong Park [Thu, 6 May 2021 01:31:33 +0000 (10:31 +0900)]
Prevent window showing during termination
Show previous window when current window was closed.
but, window showing causes invalid memory access in termination.
so, prevent window showing during app termination.
Change-Id: I7878594d5ba12b5300523e00262ff84d95072ba7
Signed-off-by: SangYong Park <sy302.park@samsung.com>
Youngsoo Choi [Fri, 8 Jan 2021 02:52:40 +0000 (18:52 -0800)]
[Service] Sync with the latest security changes from tizen 6.5
The latest security changes are synced from tizen 6.5.
Note that the fs module control is not needed anymore
because of thread based smack label.
Together with:
https://review.tizen.org/gerrit/257363
Change-Id: Ie0f4717b8074e773b4b9467cc89d8be3dd9976f2
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Fri, 22 Jan 2021 03:33:49 +0000 (12:33 +0900)]
[Service] Add MDE webapis
This adds following MDE APIs to get device name and login id.
>> webapis.mde.getCurrentLoginId()
>> webapis.mde.getDeviceName()
Together with:
https://review.tizen.org/gerrit/252359
Change-Id: I790c8b56d33f7e9fe4b4571420bd363c73ab103a
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Fri, 22 Jan 2021 03:33:36 +0000 (12:33 +0900)]
Don't use rpm command in spec file
The use of rpm command will block OBS build process.
This replace it with cat command to read chromium-efl version.
Change-Id: Ia323b03a77bb7c7651ed015b0d9ded48d20ca0dc
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
DongHyun Song [Tue, 16 Feb 2021 02:39:03 +0000 (11:39 +0900)]
[WRTjs] Apply refineResolveFilename only global model
With standalone model, there is exception when refineResolveFilename
is called.
"The internet permission is missing"
Note.
"internet" privilege can be omitable, because there is no webapi
requesting "internet" privilege actually.
Change-Id: I89cdf08c213adaaff4aa9a97931c4f9bf01af07d
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
liwei [Thu, 21 Jan 2021 03:41:57 +0000 (11:41 +0800)]
fixup! [Service] Print appcontrol data when service app is launched
When service app is launched by "new Service()", appcontrol is not set,
so need pre-check appcontrol.
Change-Id: Iffe21fbce952fb6cfb349d72749d8731ec19dceb
Signed-off-by: liwei <wei90727.li@samsung.com>
liwei [Fri, 20 Nov 2020 04:43:29 +0000 (12:43 +0800)]
[Service] Print appcontrol data when service app is launched
Now in many scenario UI app launch service app, service app will
check tizen.application.getCurrentApplication().getRequestedAppControl()
operation and data, so print this data is good for debugging.
(ex.
3201506003227, STARZY)
Change-Id: Ia78a7ea1d1b5627d32fe0041e0e4ef656e605e91
Signed-off-by: liwei <wei90727.li@samsung.com>
Bot Blink [Thu, 7 Jan 2021 01:28:45 +0000 (01:28 +0000)]
Merge "Fix wrong function name" into tizen_6.0
DongHyun Song [Wed, 6 Jan 2021 04:42:46 +0000 (13:42 +0900)]
Fix wrong function name
change 'showPlainNotification' to 'postPlainNotification'
Change-Id: Id1e4c307e9acd45715a843b8305e92c01055afe5
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Youngsoo Choi [Mon, 21 Dec 2020 04:13:36 +0000 (20:13 -0800)]
[Service] Drop privilege of hybrid web app
The hybrid web app should have smack label "User::Pkg::$pkg_id::App::$app_id".
Tizen security reference:
https://wiki.tizen.org/Security:TizenSmackReferencePolicy#label_of_applications
Together with:
https://review.tizen.org/gerrit/250122
Change-Id: I63e386d949fef6665a8c7bd8b9d6dcba8f7c825f
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Wed, 9 Dec 2020 11:17:39 +0000 (03:17 -0800)]
fixup! Revise version for tizen 6.5
This revises default version to tizen 6.0.
Change-Id: I211edbc890c90fa32f2fd4ce8de0836aa646609b
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
DongHyun Song [Thu, 17 Dec 2020 05:05:07 +0000 (14:05 +0900)]
[Service] Add getPkgApiVersion for global model
xwalk.utils.getPkgApiVersion will return required_version of
config.xml. (a.k.a. api version)
This getPkgApiVersion() is used to check api privileges which is
allowed in Tizen platform version.
Without this patch, getPkgApiVersion() will returns wrt-service
package's api version in its manifest.
Change-Id: I4d79508d3ac160588fe13222eefd3bbe57954a13
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Thu, 17 Dec 2020 05:08:39 +0000 (05:08 +0000)]
Merge "[Service] Support simple notification popup" into tizen_6.0
DongHyun Song [Thu, 26 Nov 2020 04:01:47 +0000 (13:01 +0900)]
[Service] Support simple notification popup
User apps can use this notification posting API by calling
webapis.postPlainNotification()
- title: string, mandatory
- message: string, mandatory
- timeout: number, optional (10s default)
Actually, this feature is alternative simple solution to show
notification popup of tizen.UserNotification webapi.
Global notification webapis is not included in TV platform.
Related patch:
https://review.tizen.org/gerrit/248025/
Change-Id: Ibf51f707be4b1edf3fc50dd94041df38cbdae168
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Youngsoo Choi [Wed, 9 Dec 2020 11:17:39 +0000 (03:17 -0800)]
Revise version for tizen 6.5
This revises default version for tizen 6.5.
Note that TV and DA profile doesn't have Tizen 6.5 gbs repository yet.
Change-Id: I127aa672336bbe8c0ad25a69848b9176f5e3552a
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Thu, 3 Dec 2020 08:37:00 +0000 (00:37 -0800)]
[WRTjs][Service] Drop thread privilege of service app
This drops the privilege of service app and sets it to User::Pkg::{PKG_ID}.
With this changes, the service app is under control of kernel smack rule.
Together with:
https://review.tizen.org/gerrit/249088
Change-Id: Icccd23cc27842cb24f3e81afc21f8d5d013460bf
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Tue, 1 Dec 2020 06:21:12 +0000 (22:21 -0800)]
[Service] Provide smack control
This provides smack control for accessing to file system
using smack rules defined in /sys/fs/smackfs/load2 for each app.
Together with:
https://review.tizen.org/gerrit/248692
Change-Id: I279cac4702c02f3a38bba5dc204cb1e41e23a79c
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Aron kim [Wed, 2 Dec 2020 04:34:04 +0000 (20:34 -0800)]
fixup! [Service] Add mde interface.
Remove unused function.
Change-Id: Ic4249b6559e02f6cf081126123c0acc4d886d7bf
Signed-off-by: Aron kim <aron.kim@samsung.com>
Aron kim [Wed, 25 Nov 2020 07:01:55 +0000 (23:01 -0800)]
[Service] Add mde interface.
This patch provides mde webapi interface for MDE Framework
Relate patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/248306/
Change-Id: Ica91c8759fcc900831cf7ef2c12c12d35add55e9
Signed-off-by: Aron kim <aron.kim@samsung.com>
Bot Blink [Fri, 27 Nov 2020 01:15:33 +0000 (01:15 +0000)]
Merge "[Service] Provide privilege |internet| for the use of network modules" into tizen_6.0
Bot Blink [Thu, 26 Nov 2020 10:42:33 +0000 (10:42 +0000)]
Merge "Don't display splash screen in background mode" into tizen_6.0
Youngsoo Choi [Mon, 23 Nov 2020 02:05:12 +0000 (18:05 -0800)]
[Service] Provide privilege |internet| for the use of network modules
As per Tizen security policy, accessing to network should have
Tizen internet privilege.
So, this provides |internet| privilege control for the use of
Nodejs built-in network modules.
Change-Id: If08648f7ba98e90f0af698d608338fff79f86c45
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Mon, 23 Nov 2020 02:05:12 +0000 (18:05 -0800)]
[Service] Refactor access control of file system
This moves the control of file system to access control manager.
Together with:
https://review.tizen.org/gerrit/248284
Change-Id: I576fc1e43b26c9655ebe24efa40d5348886c365b
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Bot Blink [Wed, 25 Nov 2020 01:47:53 +0000 (01:47 +0000)]
Merge "[VD] Support VirtualEventGenerator." into tizen_6.0
Youngsoo Choi [Fri, 6 Nov 2020 04:53:58 +0000 (20:53 -0800)]
[Service] Provide access control of file system
This considers as below to provide access control of file system:
- Prevent direct access to oiginal fs module from service app
- Override |require] not to load modules from invalid path
Together with:
https://review.tizen.org/gerrit/247016/
Change-Id: I13fd7298810fc46cc2a0eb987bc6a475be366788
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
jaekuk, lee [Tue, 17 Nov 2020 08:52:55 +0000 (17:52 +0900)]
Don't display splash screen in background mode
When launching app in backgroundAtStartup launchMode,
prevent splash screen from being displayed.
Change-Id: I416fce778e5a001df5a6da855959c88d42ac19f4
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
Aron kim [Mon, 2 Nov 2020 09:29:59 +0000 (01:29 -0800)]
[VD] Support VirtualEventGenerator.
These web apis for creating virtual keyboard and mouse events.
Available in Service app on TV.
API list:
- webapis.initVirtualEventGenerator(int type);
- webapis.deInitVirtualEventGenerator(int type);
- webapis.generateVirtualKeyEvent(int keycode, int state);
- webapis.generateVirtualMouseMoveEvent(int x, int y, int move_count);
- webapis.generateVirtualMouseButtonEvent(int button, int status);
Relate patch:
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/246607/
Change-Id: If425f9eba65e596599c120d7d8d5e61ff6ee2297
Signed-off-by: Aron kim <aron.kim@samsung.com>
Youngsoo Choi [Tue, 13 Oct 2020 09:35:00 +0000 (02:35 -0700)]
[Service] Add edge orchestration interface
This provides initial edge orchestration interface.
Change-Id: I44df11d7769e9ed692790cd9efd6735a97de94c5
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Bot Blink [Mon, 9 Nov 2020 06:40:00 +0000 (06:40 +0000)]
Merge "[Service] Prevent multiple calls of wrt.stopService()" into tizen
DongHyun Song [Fri, 6 Nov 2020 00:39:03 +0000 (09:39 +0900)]
[Service][VD] Apply main thread with standalone model
With standalone model of service application, this patch will apply
main thread service_runner to solve crash problems of node worker.
Change-Id: I5fb69368a4bae36ac11d465200b2cd0a42e6c3a1
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
DongHyun Song [Fri, 6 Nov 2020 07:55:37 +0000 (16:55 +0900)]
[Service] Prevent multiple calls of wrt.stopService()
In case of RakutenTV app, it calls tizen.application...exit()
twice. Of course WRTServiceManager::Remove() will skip stopService
at the second time, this patch can skip stopService() sequence more
early time.
Change-Id: I65fdfb13f28834e4093f6be7888054e6aec7162b
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
DongHyun Song [Sun, 8 Nov 2020 11:12:31 +0000 (20:12 +0900)]
[Service] Terminate node without process.exit()
Node process will be terminated by uv handleres release instead of
process.exit().
Related patch:
https://review.tizen.org/gerrit/247203/
Change-Id: I24824ed1cc7ed9c055502d29a9008d27fedd3031
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Fri, 6 Nov 2020 04:02:17 +0000 (04:02 +0000)]
Merge "[Service] Terminate worker more gracefully" into tizen
DongHyun Song [Fri, 6 Nov 2020 00:48:12 +0000 (09:48 +0900)]
[Service] Terminate worker more gracefully
process.exit() in node worker will call Worker::Exit(), which stop
the thread asyncronously. So WorkerThreadData is released later
after worker's exit event.
worker.terminate() in main thread will call Worker::StopThread(),
which processes Worker::JoinThread() as well as Worker::Exit().
JoinThread() can defer parent's exit() call after worker's gone.
Change-Id: Iad6bd2d64f158e7d6734500a7ab0623d75ad630f
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
jihwankim [Thu, 5 Nov 2020 09:41:15 +0000 (18:41 +0900)]
[DA] Emit 'ready-to-show' instead of call 'show'.
Now, to enhance launch speed of web app, DA calls 'mainWindow.show'.
But because of this, 'ready-to-show' is now emitted from electron,
and this makes malfunction after pause/resume.
So, emit 'ready-to-show' to enhance launch speed, not call 'mainwindow.show'.
Change-Id: I103b1a4fc8f89ebe8b748f43f45f7979ef9377ef
Signed-off-by: jihwankim <jh_marc.kim@samsung.com>
DongHyun Song [Mon, 2 Nov 2020 07:55:24 +0000 (16:55 +0900)]
[Service] Refactor unload xwalk extension
unloadInstance() is introduced for optimizing memory on global
model. But with irregular crash problems on UvTaskRunner's
OnTimeout function, it try to access xwalk instance after deleted.
This patch will remove calling unloadInstance() API.
Unloading xwalk extension will be refactored below patch.
Related patch:
https://review.tizen.org/gerrit/246586/
Change-Id: Ie6a74b815680f02530fd2553427d03bf1634d612
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
KyungYoun Won [Fri, 30 Oct 2020 01:25:36 +0000 (01:25 +0000)]
Merge "[DA] Show native window in app-control." into tizen
DongHyun Song [Thu, 29 Oct 2020 07:10:52 +0000 (16:10 +0900)]
[Service] Release fake timer when stopService.
This fake timer is to avoid unknown uv loop delay issue.
It should clear this fake timer after stopService.
Change-Id: I320dcdf6d0b0066e560692bdb9c56b3ec9b8352a
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
jihwankim [Wed, 28 Oct 2020 04:10:22 +0000 (13:10 +0900)]
[DA] Show native window in app-control.
Now, native window is shown when 'ready-to-show' is called.
This is an intentional operation using an electron api.
But because of this, there is a VOC that the launch speed of the web app seems to be slow.
DA decided that it would be better to show the window if it is not ready.
(Even if it is an empty screen)
So call WebApplication.show in app-control callback.
This patch uses DAExtension api, so this should be applied with or after the patch below.
https://review.tizen.org/gerrit/#/c/platform/framework/web/chromium-efl/+/246305/
Change-Id: I5a872ab0408b739d86890fc03c942c927160fdc8
Signed-off-by: jihwankim <jh_marc.kim@samsung.com>
Bot Blink [Tue, 27 Oct 2020 04:42:23 +0000 (04:42 +0000)]
Merge "Refactor suspend sequence" into tizen
Bot Blink [Tue, 27 Oct 2020 01:09:18 +0000 (01:09 +0000)]
Merge "Remove wrt.tv.flushCookie()" into tizen
DongHyun Song [Mon, 26 Oct 2020 10:07:57 +0000 (19:07 +0900)]
Refactor suspend sequence
To guarantee unload* events, suspend() should be deffered after
closing windows.
Related patch:
https://review.tizen.org/gerrit/246015/
https://review.tizen.org/gerrit/245417/
Change-Id: Id13a275b64e75f985e0115eee6771e3c29dd9cd9
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Mon, 26 Oct 2020 07:30:41 +0000 (07:30 +0000)]
Merge "[TV] Bring cancelDialogs() forward to before-quit" into tizen
Bot Blink [Fri, 23 Oct 2020 07:07:56 +0000 (07:07 +0000)]
Merge "[TV] Remove unnecessary code" into tizen
DongHyun Song [Mon, 12 Oct 2020 08:32:23 +0000 (17:32 +0900)]
[TV] Bring cancelDialogs() forward to before-quit
With below refactor patch,
https://review.tizen.org/gerrit/245417/
Defered timing of closing windows, Sometimes, JS exception is
coming due to access of destroyed Object at
wrt.tv.cancelDialogs(this.mainWindow.webContents);
Change-Id: I207c890cb84e6aaec8ed13316c39b80dd2e6cd3c
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
DongHyun Song [Thu, 22 Oct 2020 05:15:08 +0000 (14:15 +0900)]
Refactor suspend sequence
1) Bring forward suspend time when before-quit.
** When OnTerminate is coming first earlier than OnPause,
'quit' makes this.webApplication as undefined, then
wrt.on('suspend'...) will be skipped. This means that
With normal termination sequence, suspending might be not
handled.
2) Even though background runnable app, when app is in quitting,
enable suspend sequence for right termination sequence.
Change-Id: Ie40f650ea317d6f198f9c1c1aa07c9bc6867b693
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Wed, 21 Oct 2020 15:00:03 +0000 (15:00 +0000)]
Merge "[Service][Reland] Apply node worker for standalone model" into tizen
Bot Blink [Wed, 21 Oct 2020 14:56:28 +0000 (14:56 +0000)]
Merge "[Service] Exception is throwing if argument length is 0" into tizen
k2.nagaraju [Mon, 19 Oct 2020 15:35:06 +0000 (21:05 +0530)]
[Service] Exception is throwing if argument length is 0
Calling |resolveVirtualRoot| with |0| parameter throwing
exception, which is causing failure in service filesystem webtct.
Change-Id: I5e8d54f916d408145331066b31f7432ad7a3be55
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
Bot Blink [Wed, 21 Oct 2020 06:26:10 +0000 (06:26 +0000)]
Merge "[Service][TV] Support more webapis.productinfo" into tizen
DongHyun Song [Wed, 21 Oct 2020 06:21:48 +0000 (15:21 +0900)]
[TV] Remove unnecessary code
clearDeadMount() was removed from
https://review.tizen.org/gerrit/245799/
Change-Id: I56d6198754962d24131b318ddb986e96f355ceac
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
DongHyun Song [Tue, 13 Oct 2020 10:03:27 +0000 (19:03 +0900)]
[Service][Reland] Apply node worker for standalone model
This patch includes below,
1) unify source code with global model.
2) isolate v8 variable scope from main thread.
- standalone service application cannot get main global variable.
of service_manaer / service_runner
3) refactor handling message with node worker.
4) refactor termination sequence of node worker more gracefully.
- process.exit() is invoked by worker side
- parent handles on('exit') for clean-up
Additionally, there is no noticeable memory increase with node worker.
References:
https://review.tizen.org/gerrit/244938/
https://review.tizen.org/gerrit/245591/
Change-Id: Ie9c17b373a69585ca755e39c4ab56243406821a2
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Youngsoo Choi [Mon, 19 Oct 2020 12:11:03 +0000 (05:11 -0700)]
[Service] Make appInfo writable
In follwing sample code, The appInfo needs to be writable with
application information having app id 'TCT_APPCONTROL_APPID' as TC expected.
> var app = tizen.application.getCurrentApplication();
> app.appInfo =
> tizen.application.getAppInfo(application_common.TCT_APPCONTROL_APPID);
Change-Id: I6d89d5d1c0d9c241cebc5ff92b15167c890f1a55
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
liwei [Mon, 28 Sep 2020 07:35:21 +0000 (15:35 +0800)]
[Service][TV] Support more webapis.productinfo
Support webapis.productinfo.is8KPanelSupported() /
isUHDAModel() / getSmartTVServerType() / isWallModel()
Native Patch:
https://review.tizen.org/gerrit/244962/
Change-Id: Icdd34cf44338a8d5b92bfad1c98cd96b07309b4a
Signed-off-by: liwei <wei90727.li@samsung.com>
Bot Blink [Tue, 13 Oct 2020 08:44:20 +0000 (08:44 +0000)]
Merge "Revert "[Service] Apply node worker for standalone model"" into tizen
DongHyun Song [Tue, 13 Oct 2020 08:14:52 +0000 (08:14 +0000)]
Revert "[Service] Apply node worker for standalone model"
This reverts commit
2b011acf4a65ec8b940605ddeb53cc3709f2009d.
Change-Id: I4203e460734b8befd84a2286663ae6c41a7b3232
DongHyun Song [Tue, 13 Oct 2020 08:14:25 +0000 (08:14 +0000)]
Revert "[Service] Refactor stop service sequence"
This reverts commit
dd79b18738cdb66f003a5195e78b5ff03248e27e.
Change-Id: If6ff1a847e9aeed86faf9fd9fc014971c339096f
DongHyun Song [Tue, 29 Sep 2020 02:47:49 +0000 (11:47 +0900)]
Remove wrt.tv.flushCookie()
flushCookie() will be called on WRTCookieManager's dtor.
flushStorageData() is applied for all profile.
Related chromium-efl patch:
https://review.tizen.org/gerrit/245001/
Change-Id: Ic339b7d639c76dd5829c1a8f0ba0bd1d24941823
DongHyun Song [Tue, 13 Oct 2020 01:20:10 +0000 (10:20 +0900)]
[Service] Refactor stop service sequence
When service application needs to terminate by tizen://exit, it
should call wrt.stopService(id).
However, it is called in worker thread with standalone model,
WRTServiceManager::Remove() will be handled in worker thread, not
main thread. then, uv loop sometimes makes abort() or get SIGSEGV.
Then, wrt.stopService(id) should be called in main thread side.
Change-Id: I103bf8f38111db984bb22d0af56c05456851b681
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Youngsoo Choi [Thu, 8 Oct 2020 04:43:49 +0000 (21:43 -0700)]
[Service] Make application.getCurrentApplication work
The appInfo.id of application.getCurrentApplication()
should be its own service id, not 'org.tizen.chromium-efl.wrt-service'.
The object returned from application.getCurrentApplication()
is non re-writable. So, new object is needed to modify the id.
Btw, broadcast APIs need to have daemon id because they are working
on app id of current process.
Change-Id: I71a62f9dc0bccd68fa7e2b9269a2543e651ec64a
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Wed, 7 Oct 2020 08:08:49 +0000 (01:08 -0700)]
fixup! [Service] Make application.getAppContext work
This changes arguments with array.
Change-Id: I4f729b560b581a94c6f2ce1a914baf0bece55038
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Tue, 6 Oct 2020 09:32:50 +0000 (02:32 -0700)]
[Service] Make application.getAppContext work
This makes service app have its own service app id from
application.getAppContext(), not 'org.tizen.chromium-efl.wrt-service'.
Change-Id: I7378802cc61ea42e2b79559e0d83526d7da665dd
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Bot Blink [Mon, 5 Oct 2020 11:28:21 +0000 (11:28 +0000)]
Merge "[Service] Apply node worker for standalone model" into tizen
Youngsoo Choi [Mon, 5 Oct 2020 10:41:42 +0000 (03:41 -0700)]
[Service] Let UI service use web app privileges
The UI service has used web app privileges
because it resides in Web Runtime browser thread.
This resolves following error:
>> TypeError: wrt_1.wrt.getPrivileges is not a function
Change-Id: I3258513a88b4ae34604ee41b57ac56828656b3ae
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
DongHyun Song [Mon, 28 Sep 2020 06:32:06 +0000 (15:32 +0900)]
[Service] Apply node worker for standalone model
This change is implemented for
1) unify source code with global model
2) isolate v8 variable scope from main thread
- standalone service application cannot get main global variable
of service_manaer / service_runner
There is no noticeable memory increase with node worker.
Change-Id: I7bb4576026ce326a3903987c537810093db028b4
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Mon, 5 Oct 2020 01:46:30 +0000 (01:46 +0000)]
Merge "[Service] Update app_id based on input received." into tizen
k2.nagaraju [Thu, 1 Oct 2020 17:22:13 +0000 (22:52 +0530)]
[Service] Update app_id based on input received.
If passed parameter is |false| or |undefined| then also
|app_id| is updated as current app id. which is causing
failure in application webtct failure.
Change-Id: Id4ba0c2ea5068620c422585311cfc65ed81ad6c8
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
k2.nagaraju [Wed, 30 Sep 2020 11:40:30 +0000 (17:10 +0530)]
[service] Add notification xwalk extension support for service app.
For alarm service webtct notification xwalk extension support is needed.
updated the entry points for notification extension.
Change-Id: If4857b74a5929e03c6738858e8a3a9098af90c22
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
liwei [Tue, 29 Sep 2020 05:44:54 +0000 (13:44 +0800)]
[Service] Add service type in node worker
Add service type in node worker, otherwise value of
"global.serviceType" is 'undefined', service app in
global service cannot work well.
Change-Id: I39fadd30c14b89f20b1bf817fe4d9db46f65eb44
Signed-off-by: liwei <wei90727.li@samsung.com>
DongHyun Song [Thu, 10 Sep 2020 00:36:51 +0000 (09:36 +0900)]
[Service][TV] Add TV productinfo webapis
Add webapis.productinfo of TV profile.
Related chromium-efl patch:
https://review.tizen.org/gerrit/238981/
Change-Id: I1c865e7d0b2f2708f09e4de504a52836585c7090
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Fri, 25 Sep 2020 04:27:27 +0000 (04:27 +0000)]
Merge "[D2D] Change path for app routing." into tizen
Aron kim [Fri, 25 Sep 2020 02:19:38 +0000 (19:19 -0700)]
[D2D] Change path for app routing.
The installation path of the built-in deviceWebServer is changed.
Reroute according to the changed path.
Change-Id: I54b9004811a14e22aba5263921510b1798e43412
Signed-off-by: Aron kim <aron.kim@samsung.com>
Youngsoo Choi [Thu, 24 Sep 2020 11:48:29 +0000 (04:48 -0700)]
[Service] Fix not returning handler id of systeminfo
The systeminfo device API should return handler id
to control listener later.
Change-Id: Idc12f8164be0a500a29b1a272899148e3c17aff7
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
DongHyun Song [Wed, 9 Sep 2020 09:31:38 +0000 (18:31 +0900)]
[Service] APIRouter - xwalk.util.checkPrivilegeAccess
xwalk.util.checkPrivilegeAccess() is an internal API of webapis
for checking the app has proper privilege.
If the app hasn't required privilege, it will throw exception.
For example, When 'tizen.filesystem.listStorages' is handled
xwalk.utils.checkPrivilegeAccess(
xwalk.utils.privilege.FILESYSTEM_READ);
it checks if the app has 'filesystem.read' privilege, then,
this overrided checkPrivilegeAccess() can inspect its privileges
defined in config.xml. (not wrt-service's privileges)
This is different from AccessControlManager's webapis drops.
In webapis, there are two ways of privilege checking.
1) by xwalk.util.checkPrivilegeAccess()
2) by cynara inspection directly
AccessControlManager purpose should be considered way #2.
webapis's cynara DB checking, it always inspects on wrt-service's.
Then, AccessControlManager should be able to disable webapis which
the app doesn't have required privileges.
Change-Id: I84ce85a580a483c209d354ca2f1b7c3d17c08fb3
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Thu, 24 Sep 2020 04:26:51 +0000 (04:26 +0000)]
Merge "[Service][TV] Refactor for wasm-caching shutdown" into tizen
Bot Blink [Thu, 24 Sep 2020 04:19:06 +0000 (04:19 +0000)]
Merge "[Service] Refactor builtin-service with node worker" into tizen
DongHyun Song [Mon, 21 Sep 2020 08:13:22 +0000 (17:13 +0900)]
[Service][TV] Refactor for wasm-caching shutdown
1) Calls delayShutdown() every wasm cache creation.
- If built-in service is implemented with async functions, after
run() is done and there is no running services, node main will
be terminated by itself 1 minute later.
delayShutdown() can reset the timeout to 1 min.
2) After finish wasm-caching, notify parent to terminate node worker
- When wasm-caching is finished, node worker is able to terminate
by stop messaging
Change-Id: I23b3587d3f3746a451b517c7cd7a70c5f9593302
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
DongHyun Song [Mon, 14 Sep 2020 10:02:37 +0000 (19:02 +0900)]
[Service] Refactor builtin-service with node worker
This applies builtin-service to execute on node worker same as
service application with refactoring worker creation/termination.
Change-Id: I105a4e3f91409deb9805ac2ca08e4e62a162c2fa
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Aron kim [Wed, 23 Sep 2020 06:02:17 +0000 (23:02 -0700)]
[D2D] Add privilege for DeviceWebServer.
http://tizen.org/privilege/filesystem.read
http://tizen.org/privilege/filesystem.write
http://tizen.org/privilege/mediastorage
Change-Id: I393428a9a6d44ecd6311e425a4d3fe6f76bec29f
Signed-off-by: Aron kim <aron.kim@samsung.com>
k2.nagaraju [Mon, 21 Sep 2020 18:32:04 +0000 (00:02 +0530)]
[service] filesystem web deviceapi call getting hanged.
filesystem deviceapi calls are overloaded, some functions
expecting return value. But it is not returning, which is causing
failure of test cases.
Change-Id: I77d08193fcc9aa7505f53836a36b78cb82697b30
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
Bot Blink [Mon, 21 Sep 2020 04:54:55 +0000 (04:54 +0000)]
Merge "[Service] update package_id based on input received" into tizen
k2.nagaraju [Wed, 16 Sep 2020 17:46:01 +0000 (23:16 +0530)]
[Service] update package_id based on input received
If passed parameter is |false| or |undefined| then also
|package_id| is updated as current package. which is causing
failure in package service webtct failure.
Change-Id: I6823ed175c3e65224e699d3084b28cd27eb3fab9
Signed-off-by: k2.nagaraju <k2.nagaraju@samsung.com>
DongHyun Song [Thu, 17 Sep 2020 07:52:51 +0000 (16:52 +0900)]
[Service] Remove global.gc()
LowMemoryNotification() with repeat timer will replace global.gc()
in JavascriptEnvironment side.
Related chromium-efl patch:
https://review.tizen.org/gerrit/244329
Change-Id: I18864ed3de3b3c7ac367f4d247e3e1b81a9c9564
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Bot Blink [Wed, 16 Sep 2020 02:33:48 +0000 (02:33 +0000)]
Merge "[Service]Add more xwalk extensions for service app" into tizen
Chunling Ye [Tue, 4 Aug 2020 07:41:28 +0000 (15:41 +0800)]
[Service]Add more xwalk extensions for service app
1.add xwalk extensions: exif/content/download/account/iotcon
2.fix window not defined error for exif extension
Change-Id: I5c53c8d4bbc0fc0267e05c14b50731f628024732
Signed-off-by: Chunling Ye <chunling.ye@samsung.com>
Youngsoo Choi [Fri, 11 Sep 2020 01:38:21 +0000 (18:38 -0700)]
[Service] Call global.gc() when terminating a service
This calls global.gc() when a service app is terminated.
Approximately, 1 MB memory is saved by this.
Also, the main thread is immediately terminated
when there's no running worker thread for service app.
Together with:
https://review.tizen.org/gerrit/243858
Change-Id: Iab70e9aadedb19295a3784fb5cc3dc1300412995
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Aron kim [Thu, 10 Sep 2020 05:16:15 +0000 (22:16 -0700)]
[D2D] Modify to not launch d2d app repeatedly.
When the remote client launching the d2d app in device home,
change to connect only the websocket if the d2d app status
is visible.
Change-Id: Iab323ee86cc3a979521daf6c3a6b7485904233a6
Signed-off-by: Aron kim <aron.kim@samsung.com>
DongHyun Song [Wed, 2 Sep 2020 08:16:19 +0000 (17:16 +0900)]
[Service] Fix memory leak with worker isolation
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>
DongHyun Song [Wed, 2 Sep 2020 08:16:19 +0000 (17:16 +0900)]
[Service] Introduce worker isolation
node-vm, previous way to isolate service applications, has a big
problem of global scope sharing with Tizen webapis. Becuase tizen
webapi objects are registered on global scope, with DeviceAPIRouter
overrieded APIs are shared by each service application calling.
In addition, require() is also running on global scope, even though
apps are calling require() in their sandbox context, imported
modules are running global scope.
Thus, isolation of global scope is most important for global wrt-
service. Node worker is very proper way to isolate each service
application. With node worker, v8::Isolatee and v8::IsolateData
are created separately. Then, each service app is able to have
each independent global object.
Reference patch:
https://review.tizen.org/230796/
Change-Id: Ic4008ed7a8331327eeb84facba55418e971e2271
Signed-off-by: DongHyun Song <dh81.song@samsung.com>
Youngsoo Choi [Mon, 7 Sep 2020 11:53:21 +0000 (04:53 -0700)]
fixup! [D2D] Support wgt-in-rpm for d2d server
This moves libtzplatform-config for all profiles.
Change-Id: I82c17747678ae0dc2afa662c6ea5834f4fd597d8
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Mon, 7 Sep 2020 02:20:12 +0000 (19:20 -0700)]
[D2D] Set on-boot to false
This sets on-boot to false.
The d2d server will be optionally launched later.
Change-Id: Iab66894fd1e59ad21b1f81a6a9bb616319052ec5
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
Youngsoo Choi [Fri, 4 Sep 2020 13:03:42 +0000 (06:03 -0700)]
fixup! [D2D] Support wgt-in-rpm for d2d server
The d2d server installation wasn't worked since it was installed in
read-write area. The OBS only makes platform image from read-only area.
So, this tries to locate the d2d server sources in read-only area.
Change-Id: Ie4d4e79c90ea5f8d55860b8669213933a7a58f54
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>
jaekuk, lee [Thu, 3 Sep 2020 22:46:33 +0000 (07:46 +0900)]
Change base repo for DA
Change-Id: I37d020e924bf59c974bb68c73c89cb41b6efe3f3
Signed-off-by: jaekuk, lee <juku1999@samsung.com>
Youngsoo Choi [Wed, 2 Sep 2020 12:04:32 +0000 (05:04 -0700)]
[D2D] Support wgt-in-rpm for d2d server
This supports signing, packaging and installing for d2d server.
After installing the d2d server, the wgt file is deleted to save ROM size.
Currently, d2d sever is enabled by default for public profile
since it is public feature.
If you want to use d2d server feature for the other profiles,
please use d2d option like below:
$ ./tizen/build/build_tv.sh --d2d
Change-Id: Ief216021799723782a5777aba9c19b940f6c2cb8
Signed-off-by: Youngsoo Choi <kenshin.choi@samsung.com>