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 787871 - Warning from workspaceThumbnail: reference to undefined property "_switchWorkspaceNotifyId"
Warning from workspaceThumbnail: reference to undefined property "_switchWork...
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: overview
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2017-09-19 06:50 UTC by xiaoguang wang
Modified: 2018-05-02 18:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Avoid JS WARNING (922 bytes, patch)
2017-09-19 07:47 UTC, xiaoguang wang
none Details | Review
Avoid JS WARNING (949 bytes, patch)
2017-09-20 01:07 UTC, xiaoguang wang
committed Details | Review

Description xiaoguang wang 2017-09-19 06:50:40 UTC
After you log out and log in again, there is a JS WARNING.

JS WARNING: [resource:///org/gnome/shell/ui/workspaceThumbnail.js 892]: reference to undefined property "_switchWorkspaceNotifyId"
Comment 1 xiaoguang wang 2017-09-19 07:47:20 UTC
Created attachment 360029 [details] [review]
Avoid JS WARNING
Comment 2 Florian Müllner 2017-09-19 09:42:21 UTC
Review of attachment 360029 [details] [review]:

The canonical way to fix the warning would be to initialize the signal ID variables to 0 in _init() - I'm a bit wary that the shortcut may leak signal handlers in some cases (say, for example, an exception in _ensurePorthole()), although it should work fine under normal circumstances.

The commit message needs some fixes though, something along the lines of:

workspaceThumbnails: Avoid access to undefined variables

If thumbnails haven't been created, they don't need to be destroyed.
Comment 3 xiaoguang wang 2017-09-20 01:07:58 UTC
Created attachment 360095 [details] [review]
Avoid JS WARNING
Comment 4 Florian Müllner 2017-09-21 18:22:07 UTC
Review of attachment 360095 [details] [review]:

I'm still a bit worried about lingering signal handlers in case of errors, but OK.