GNOME Bugzilla – Bug 785569
gnome-maps should use var instead of let/const for gjs 1.49.4
Last modified: 2017-09-20 20:06:03 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
I suspect this is the same problem as bug 785556 of missing https://github.com/ptomato/mozjs/commit/1b82d28588ad5fe74116c6e6099c8f2f2eb392ff in your mozjs.
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.
Created attachment 360155 [details] [review] Use var instead of const/let for exported symbols
Attachment 360155 [details] pushed as f899f57 - Use var instead of const/let for exported symbols