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 707892 - Strict mode fixes
Strict mode fixes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-11 03:47 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2014-01-06 21:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove E4X (59.94 KB, patch)
2013-09-11 03:47 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
Bind "this" for various methods (1.69 KB, patch)
2013-09-11 03:47 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-09-11 03:47:41 UTC
See patches. The big churn is E4X removal, but we should just go ahead
and get it over with.

The rest is all I encountered when testing out strict mode.

I've spotted several things that *should* be restricted in strict mode,
but they weren't actually restricted because of bugs like this one:

https://bugzilla.mozilla.org/show_bug.cgi?id=889628
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-09-11 03:47:44 UTC
Created attachment 254639 [details] [review]
Remove E4X

Newer versions of gjs do not have E4X. Hell, when we *started* gnome-shell
development, E4X was already considered deprecated and dead, so we've really
been dragging our feet on this one. This works on gjs master already, so
there's no regressions there.

The bulk of the work was done by a silly little Python script I wrote called
remove4x.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-09-11 03:47:49 UTC
Created attachment 254640 [details] [review]
Bind "this" for various methods

For extremely silly reasons with how the class framework works, the wrapper
method requires "this" to be bound in order for it to work, or else we'll
emit errors in strict mode.
Comment 3 Giovanni Campagna 2013-09-11 07:31:37 UTC
Review of attachment 254639 [details] [review]:

I don't like concatenating strings (even if we assume the parser is smart enough to avoid the concatenation at runtime), can we use continuations instead?
Comment 4 Giovanni Campagna 2013-09-11 07:32:00 UTC
Review of attachment 254640 [details] [review]:

Uh, yes
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-09-11 19:02:54 UTC
Comment on attachment 254640 [details] [review]
Bind "this" for various methods

Attachment 254640 [details] pushed as 2d8ed4c - Bind "this" for various methods