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 787294 - apps-menu: GNOME Shell 3.25 complains about JS warnings
apps-menu: GNOME Shell 3.25 complains about JS warnings
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: extensions
3.25.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 784197 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-05 05:39 UTC by Alexander Rüedlinger (lexruee)
Modified: 2017-10-13 13:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Log file capturing the JS warning from the GNOME Shell (4.20 KB, text/x-log)
2017-09-05 05:39 UTC, Alexander Rüedlinger (lexruee)
  Details
Patch file that fixes the first JS warning (1.42 KB, patch)
2017-09-05 06:08 UTC, Alexander Rüedlinger (lexruee)
committed Details | Review
Patch file that fixes the second JS warning (1.36 KB, patch)
2017-09-05 06:14 UTC, Alexander Rüedlinger (lexruee)
committed Details | Review

Description Alexander Rüedlinger (lexruee) 2017-09-05 05:39:02 UTC
Created attachment 359158 [details]
Log file capturing the JS warning from the GNOME Shell

In short, on Ubuntu 17.10 the GNOME Shell 3.25.91 complains about two JS warnings when the apps-menu extension is enabled:

1) JS WARNING: [.../extension.js 65]: Too many arguments to method Clutter.Actor.add_child: expected 1, got 2

2) JS WARNING: [.../extension.js 361]: "0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead

For more details see the log file.
Comment 1 Alexander Rüedlinger (lexruee) 2017-09-05 06:08:53 UTC
Created attachment 359159 [details] [review]
Patch file that fixes the first JS warning

This patch file fixes the first JS warning by removing the extra argument, which seems to be unnecessary, since the method Clutter.Actor.add_child takes only a single argument as documented in [1].

[1] https://developer.gnome.org/clutter/stable/ClutterActor.html#clutter-actor-add-child
Comment 2 Alexander Rüedlinger (lexruee) 2017-09-05 06:14:40 UTC
Created attachment 359160 [details] [review]
Patch file that fixes the second JS warning

The second patch file fixes the second JS warning by using the "0o" prefix, as advised by the JS warning message.
Comment 3 Florian Müllner 2017-09-05 12:53:59 UTC
Review of attachment 359160 [details] [review]:

LGTM, thanks
Comment 4 Florian Müllner 2017-09-05 12:54:01 UTC
Review of attachment 359159 [details] [review]:

The lines in the commit body are too long, otherwise looks good (it's probably more interesting to point to commit 63653406a3f as the source of the bug than referencing line numbers or Clutter's API docs, but it doesn't really matter)
Comment 5 Alexander Rüedlinger (lexruee) 2017-09-05 17:00:14 UTC
Thanks for the feedback, Florian.
As a newcomer, I will hopefully get it right next time :-).

Cheers,
Alexander
Comment 6 Florian Müllner 2017-09-17 21:21:28 UTC
We are no longer in hard code freeze, so pushing (with slightly modified commit messages).
Comment 7 Florian Müllner 2017-10-13 13:35:11 UTC
*** Bug 784197 has been marked as a duplicate of this bug. ***