If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Remove support for conditional catch expressions




JavaScript Engine
2 years ago
3 months ago


(Reporter: David Bruant, Unassigned)


(Blocks: 1 bug, {dev-doc-needed, site-compat})

Firefox Tracking Flags

(Not tracked)




2 years ago
These are not standard and there doesn't seem to be a signal from standard folks that they will be anytime soon. They should probably be eventually removed from SpiderMonkey
Posted the site compatibility doc: https://www.fxsitecompat.com/en-US/docs/2015/conditional-catch-clause-support-will-be-removed/
Keywords: dev-doc-needed, site-compat

Comment 2

2 years ago
I only meant to file the bug, I don't the decision has been made to the point it can be communicated yet.
ni'ing jorendorff in his quality of module owner.
Flags: needinfo?(jorendorff)
I think we should keep this extension.

Some features are either incompatible with the ECMA standard, or an implementation burden, or both. Those should go.

This is neither -- and it's been allowed in all JS versions for many years, so dropping it will cost.

Not every language extension needs to die. It's a judgment call.
Flags: needinfo?(jorendorff)
Just to note, that since we're using ESLint and ESLint doesn't support conditional catch clauses, I think pretty much all of the instances that Firefox was using have been removed.

If we did want to allow it in gecko code, we'd probably need to find a way to extend the ESLint parser in such a way that we could support it, although I suspect that could cause more work than we'd really want to do.
You need to log in before you can comment on or make changes to this bug.