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 778793 - Fix errors/warnings with latest gjs
Fix errors/warnings with latest gjs
Status: RESOLVED FIXED
Product: polari
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Polari maintainers
Polari maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-16 21:46 UTC by Florian Müllner
Modified: 2017-02-17 22:37 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
chatView: Initialize ButtonTag properties early (875 bytes, patch)
2017-02-16 21:46 UTC, Florian Müllner
none Details | Review
userTracker: Move let declaration to the right statement (1.23 KB, patch)
2017-02-16 21:46 UTC, Florian Müllner
none Details | Review
telepathyClient: Use correct property name (1.10 KB, patch)
2017-02-16 21:46 UTC, Florian Müllner
none Details | Review
telepathyClient: Use normal function parameters (1.74 KB, patch)
2017-02-16 21:46 UTC, Florian Müllner
none Details | Review
chatView: Don't access unset property (1.07 KB, patch)
2017-02-16 21:46 UTC, Florian Müllner
none Details | Review
Initialize properties early (1.87 KB, patch)
2017-02-16 22:32 UTC, Florian Müllner
committed Details | Review
userTracker: Move let declaration to the right statement (1.23 KB, patch)
2017-02-16 22:32 UTC, Florian Müllner
committed Details | Review
Use correct property names (1.72 KB, patch)
2017-02-16 22:33 UTC, Florian Müllner
committed Details | Review
telepathyClient: Use normal function parameters (1.74 KB, patch)
2017-02-16 22:33 UTC, Florian Müllner
committed Details | Review
chatView: Don't access unset property (1.07 KB, patch)
2017-02-16 22:33 UTC, Florian Müllner
committed Details | Review
userTracker: Shut up a gjs warning (992 bytes, patch)
2017-02-16 22:34 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2017-02-16 21:46:01 UTC
gjs was rebased to use mozjs38, which is (thankfully!) less forgiving towards errors ...
Comment 1 Florian Müllner 2017-02-16 21:46:07 UTC
Created attachment 346005 [details] [review]
chatView: Initialize ButtonTag properties early

GObject properties may be accessed during construction, so set
the backing JS properties before chaining up to the parent.
Comment 2 Florian Müllner 2017-02-16 21:46:13 UTC
Created attachment 346006 [details] [review]
userTracker: Move let declaration to the right statement
Comment 3 Florian Müllner 2017-02-16 21:46:20 UTC
Created attachment 346007 [details] [review]
telepathyClient: Use correct property name

Whoops. Thankfully the latest gjs started to complain about
bloopers like this ...
Comment 4 Florian Müllner 2017-02-16 21:46:26 UTC
Created attachment 346008 [details] [review]
telepathyClient: Use normal function parameters

Latest gjs seems to have problems with using destructuring assignment
with the arguments object - we use normal parameter syntax everywhere
else, so just switch to that here as well.
Comment 5 Florian Müllner 2017-02-16 21:46:32 UTC
Created attachment 346009 [details] [review]
chatView: Don't access unset property

We attach a timestamp of the last activity to nick tags to decide
whether to show corresponding status messages or not. However
this monkey-patched property is unset if there hasn't been any
activity from the nick - make sure to handle that case properly
instead of using an undefined value in a computation.
Comment 6 Florian Müllner 2017-02-16 22:32:04 UTC
Created attachment 346014 [details] [review]
Initialize properties early

Found some more instances of this elsewhere
Comment 7 Florian Müllner 2017-02-16 22:32:15 UTC
Created attachment 346015 [details] [review]
userTracker: Move let declaration to the right statement
Comment 8 Florian Müllner 2017-02-16 22:33:33 UTC
Created attachment 346016 [details] [review]
Use correct property names

Whoops - same property, different kind of wrong ...
Comment 9 Florian Müllner 2017-02-16 22:33:42 UTC
Created attachment 346017 [details] [review]
telepathyClient: Use normal function parameters

Latest gjs seems to have problems with using destructuring assignment
with the arguments object - we use normal parameter syntax everywhere
else, so just switch to that here as well.
Comment 10 Florian Müllner 2017-02-16 22:33:51 UTC
Created attachment 346018 [details] [review]
chatView: Don't access unset property

We attach a timestamp of the last activity to nick tags to decide
whether to show corresponding status messages or not. However
this monkey-patched property is unset if there hasn't been any
activity from the nick - make sure to handle that case properly
instead of using an undefined value in a computation.
Comment 11 Florian Müllner 2017-02-16 22:34:02 UTC
Created attachment 346019 [details] [review]
userTracker: Shut up a gjs warning
Comment 12 Bastian Ilsø 2017-02-17 21:04:17 UTC
Review of attachment 346014 [details] [review]:

looks good to me.
Comment 13 Bastian Ilsø 2017-02-17 21:06:09 UTC
Review of attachment 346015 [details] [review]:

looks good to me
Comment 14 Bastian Ilsø 2017-02-17 21:09:57 UTC
Review of attachment 346016 [details] [review]:

looks good to me
Comment 15 Bastian Ilsø 2017-02-17 21:12:22 UTC
Review of attachment 346017 [details] [review]:

looks good to me
Comment 16 Bastian Ilsø 2017-02-17 21:16:00 UTC
Review of attachment 346018 [details] [review]:

looks good to me
Comment 17 Bastian Ilsø 2017-02-17 21:17:14 UTC
Review of attachment 346019 [details] [review]:

looks good to me
Comment 18 Florian Müllner 2017-02-17 22:37:13 UTC
Attachment 346014 [details] pushed as a8b549b - Initialize properties early
Attachment 346015 [details] pushed as 992ee90 - userTracker: Move let declaration to the right statement
Attachment 346016 [details] pushed as 98d4c25 - Use correct property names
Attachment 346017 [details] pushed as 1855d15 - telepathyClient: Use normal function parameters
Attachment 346018 [details] pushed as cde6b66 - chatView: Don't access unset property
Attachment 346019 [details] pushed as 7de0df8 - userTracker: Shut up a gjs warning