We extensively use non-standard JS expression closures (function definitions as expressions) in our frontend code and MozJSMs. If we ever decide to wholesale update or Moonchild gets his head out of his ass and we can ally for the original SpiderMonkey refresh project then this would block it as the later versions of the engine no longer allow this.
Effectively, it’s:
function (arg) arg.something && somethingElse();
to become:
function (arg) {
return arg.something && somethingElse();
}
or potentially using arrow functions (be careful if it’s using "this"!). This isn't difficult just tedious.
We extensively use non-standard JS expression closures (function definitions as expressions) in our frontend code and MozJSMs. If we ever decide to wholesale update or Moonchild gets his head out of his ass and we can ally for the original `SpiderMonkey` refresh project then this would block it as the later versions of the engine no longer allow this.
Effectively, it’s:
```
function (arg) arg.something && somethingElse();
```
to become:
```
function (arg) {
return arg.something && somethingElse();
}
```
or potentially using arrow functions (be careful if it’s using "this"!). This isn't difficult just tedious.
----
Mozilla [Bug 1083459](https://bugzilla.mozilla.org/show_bug.cgi?id=1083459)
We extensively use non-standard JS expression closures (function definitions as expressions) in our frontend code and MozJSMs. If we ever decide to wholesale update or Moonchild gets his head out of his ass and we can ally for the original
SpiderMonkey
refresh project then this would block it as the later versions of the engine no longer allow this.Effectively, it’s:
to become:
or potentially using arrow functions (be careful if it’s using "this"!). This isn't difficult just tedious.
Mozilla Bug 1083459