GNOME Bugzilla – Bug 778425
Make gnome-shell ready for new GJS
Last modified: 2017-02-11 01:01:23 UTC
I've been testing gnome-shell with the wip/ptomato/mozjs38 branch of GJS and a few changes are needed. The main issue is that the following code is a syntax error in ES6, but was previously quietly accepted by GJS: let a = 'something'; let a = 'other thing'; The second line must be changed to "a = 'other thing';".
Created attachment 345395 [details] [review] main: Destroy GjsContext before exit Here are a few places where I missed it before: the GjsContext must be unrefed before exiting, or it will crash on exit.
Created attachment 345396 [details] [review] ibusManager: Use const correctly Per ES6, a variable declared const should only be valid inside its lexical scope. Previously, GJS would accept this code, but that will change in the SpiderMonkey JS engine in the next release of GJS.
Created attachment 345397 [details] [review] js: Avoid double declarations with let The following code is a syntax error in ES6: let a = 'something'; let a = 'other thing'; Previously GJS would silently accept this code, but in the next release the SpiderMonkey JS engine will be more ES6-compliant.
Review of attachment 345395 [details] [review]: LGTM
Review of attachment 345396 [details] [review]: Dto.
Review of attachment 345397 [details] [review]: ::: js/ui/endSessionDialog.js @@ +458,3 @@ _setLabelText(this._subjectLabel, subject); + dialogContent = DialogContent[this._type]; Removing the 'let' is correct of course, but the whole reassignment looks bogus to me - the variable is already set to DialogContent[this._type] and not modified.
Created attachment 345486 [details] [review] js: Avoid double declarations with let The following code is a syntax error in ES6: let a = 'something'; let a = 'other thing'; Previously GJS would silently accept this code, but in the next release the SpiderMonkey JS engine will be more ES6-compliant.
Attachment 345395 [details] pushed as d017e67 - main: Destroy GjsContext before exit Attachment 345396 [details] pushed as f7752ac - ibusManager: Use const correctly
Review of attachment 345486 [details] [review]: LGTM
Attachment 345486 [details] pushed as aefd61c - js: Avoid double declarations with let