Closed Bug 385159 Opened 17 years ago Closed 17 years ago

Make the JS shell use the latest version

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla1.9alpha6

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

Attachments

(1 file)

Attached patch FixSplinter Review
I don't see the advantage of having to type -v 180 (or version(180)) anytime I want to use let, etc. in the JS shell (this isn't the web!). Of course, js -v 0 (or similar) can downgrade to older versions.
Attachment #269056 - Flags: review?(brendan)
Comment on attachment 269056 [details] [diff] [review]
Fix

Assuming no bad effects on testsuite. Bob can stamp to remove that assumption.

/be
Attachment #269056 - Flags: review?(brendan)
Attachment #269056 - Flags: review?(bclary)
Attachment #269056 - Flags: review+
I can adapt.
Attachment #269056 - Flags: review?(bclary) → review+
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
I haven't yet updated the suite to set the version for older subsuites back to 1.5. The following tests now fail with the default version but pass if you set -v 150.

js1_5/Regress/regress-309242.js
js1_5/Regress/regress-310993.js
js1_5/Regress/regress-311071.js
js1_5/Regress/regress-31255.js
e4x related errors with <!-- comments

Is e4x turned off in js1.8?

js1_6/extensions/regress-352392.js
expected: SyntaxError: invalid for each loop actual: TypeError: (void 0) is not a function 

wtf?
(In reply to comment #4)
> js1_6/extensions/regress-352392.js
> expected: SyntaxError: invalid for each loop actual: TypeError: (void 0) is not
> a function 

This is trying to say 'undefined is not a function', from the call to Array.prototype.map, but in the new, exciting, world we can't say 'undefined', so you get void 0 instead. So this is working as intended.
The test checks: 
On the trunk I see 
v160: 'SyntaxError: invalid for each loop',
v180: 'TypeError: (void 0) is not a function' for v180. 

On 1.8.1 I see
v160: 'SyntaxError: invalid for each loop',
v180: 'TypeError: (void 0) is not a function' for v180. 

Is the change from SyntaxError to TypeError legitimate?
Sounds like you're just hitting a different error depending on the JavaScript version, because of the change in bug 366941 (which only affects v180).
Flags: in-testsuite-
Depends on: 381031
OS: Mac OS X → All
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha6
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: