Closed Bug 630897 Opened 11 years ago Closed 10 years ago

Reflect.parse: catch clauses should always be in an array

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: dherman, Assigned: dherman)

Details

(Whiteboard: reflect-parse fixed-in-tracemonkey)

Attachments

(2 files)

The Reflect.parse API special-cases the 0 and 1 cases of catch clauses, for compatibility with standard ECMAScript, which doesn't currently allow multiple clauses. But since catch guards seem pretty harmonious, we should just bite the bullet and simplify the type. This will be more convenient for clients, who don't have to insert delicate special-case logic (especially since testing array-ness is so fraught).

I'll have to check with the a.m.o folks who are using Reflect.parse() to make sure this API change is OK with them.

Dave
We're fine with a change, just let us know when you do it and what nodes you're changing the interfaces for. :)
Whiteboard: reflect-parse
Attachment #541532 - Flags: review?(jorendorff)
Attachment #541532 - Flags: review?(jorendorff) → review+
http://hg.mozilla.org/tracemonkey/rev/5b5cdbaaccd5
Whiteboard: reflect-parse → reflect-parse fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Attachment #544138 - Flags: approval-mozilla-aurora?
Comment on attachment 544138 [details] [diff] [review]
final version that landed in TM; to cherrypick for aurora

This landed in tracemonkey last week, but cdleary's merge to m-c today landed after the merge from m-c to aurora:

http://groups.google.com/group/mozilla.dev.tech.js-engine.internals/browse_thread/thread/626c85124555c0c9

Dave
Comment on attachment 544138 [details] [diff] [review]
final version that landed in TM; to cherrypick for aurora

Merged into Aurora:

http://hg.mozilla.org/releases/mozilla-aurora/rev/75552dfd25c2

Dave
Attachment #544138 - Flags: approval-mozilla-aurora?
You need to log in before you can comment on or make changes to this bug.