GNOME Bugzilla – Bug 707892
Strict mode fixes
Last modified: 2014-01-06 21:30:07 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
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.
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.
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?
Review of attachment 254640 [details] [review]: Uh, yes
Comment on attachment 254640 [details] [review] Bind "this" for various methods Attachment 254640 [details] pushed as 2d8ed4c - Bind "this" for various methods