After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 785569 - gnome-maps should use var instead of let/const for gjs 1.49.4
gnome-maps should use var instead of let/const for gjs 1.49.4
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
3.25.x
Other Linux
: Normal major
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-29 18:08 UTC by Jeremy Bicha
Modified: 2017-09-20 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use var instead of const/let for exported symbols (58.36 KB, patch)
2017-09-20 20:05 UTC, Marcus Lundblad
committed Details | Review

Description Jeremy Bicha 2017-07-29 18:08:34 UTC
gnome-maps 3.25.4 from the GNOME3 Staging PPA
on Ubuntu 17.10 Alpha

gnome-maps works fine but when I try to run it with gjs 1.49.4 built with mozjs52, it won't start


$ gnome-maps
Gjs-Message: JS WARNING: [resource:///org/gnome/gjs/modules/lang.js 163]: reference to undefined property "_construct"

(org.gnome.Maps:3614): Gjs-WARNING **: JS ERROR: TypeError: this._construct is undefined
Class@resource:///org/gnome/gjs/modules/lang.js:163:9
@resource:///org/gnome/Maps/js/zoomInNotification.js:29:28
@resource:///org/gnome/Maps/js/contextMenu.js:37:7
@resource:///org/gnome/Maps/js/mainWindow.js:33:7
@resource:///org/gnome/Maps/js/application.js:36:7
@resource:///org/gnome/Maps/js/main.js:43:7
start@resource:///org/gnome/gjs/modules/package.js:205:5
@/usr/bin/gnome-maps:2:1

JS_EvaluateScript() failed

----------------
Packages are at

https://launchpad.net/~gnome3-team/+archive/ubuntu/gnome3-staging/+packages?field.series_filter=artful

https://launchpad.net/~jbicha/+archive/ubuntu/temp20170721/+packages
Comment 1 Philip Chimento 2017-07-30 14:41:38 UTC
I suspect this is the same problem as bug 785556 of missing https://github.com/ptomato/mozjs/commit/1b82d28588ad5fe74116c6e6099c8f2f2eb392ff in your mozjs.
Comment 2 Jeremy Bicha 2017-07-30 17:00:27 UTC
Yes, once we rebuilt mozjs52 with that patch, gnome-maps starts but emits warnings like this:

Gjs-WARNING **: Some code accessed the property 'ServiceBackend' on the module 'serviceBackend'. That property was defined with 'let' or 'const' inside the module. This was previously supported, but is not correct according to the ES6 standard. Any symbols to be exported from a module must be defined with 'var'. The property access will work as previously for the time being, but please fix your code anyway.

I'm updating the bug title accordingly.
Comment 3 Marcus Lundblad 2017-09-20 20:05:19 UTC
Created attachment 360155 [details] [review]
Use var instead of const/let for exported symbols
Comment 4 Marcus Lundblad 2017-09-20 20:06:00 UTC
Attachment 360155 [details] pushed as f899f57 - Use var instead of const/let for exported symbols