init: Set console log domain

GJS added a console module that extensions may start using. To ensure that
extensions using console.log() and similar functions don't show up as
'Gjs-Console' in users' system logs, we should call setConsoleLogdomain()
with 'GNOME Shell'.

This GJS API addition is only accessible using ECMAScript Modules (ESM),
this commit moves shell startup to a small init.js module and adapts
CI jobs to either handle or ignore it.

We can drop the .jscheckignore file when future versions of SpiderMonkey
allow for compile checks without validating module specifiers.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1958>
This commit is contained in:
Evan Welsh
2021-08-20 20:42:27 -05:00
committed by Marge Bot
parent ef70364e81
commit 0d8e0025d6
7 changed files with 20 additions and 9 deletions

6
js/ui/init.js Normal file
View File

@ -0,0 +1,6 @@
import { setConsoleLogDomain } from 'console';
setConsoleLogDomain('GNOME Shell');
imports.ui.environment.init();
imports.ui.main.start();