The default bug view has changed. See this FAQ.

Make the JS shell use the latest version

RESOLVED FIXED in mozilla1.9alpha6

Status

()

Core
JavaScript Engine
--
trivial
RESOLVED FIXED
10 years ago
10 years ago

People

(Reporter: mrbkap, Assigned: mrbkap)

Tracking

Trunk
mozilla1.9alpha6
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 years ago
Created attachment 269056 [details] [diff] [review]
Fix

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+

Comment 2

10 years ago
I can adapt.

Updated

10 years ago
Attachment #269056 - Flags: review?(bclary) → review+
(Assignee)

Comment 3

10 years ago
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Comment 4

10 years ago
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?
(Assignee)

Comment 5

10 years ago
(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.

Comment 6

10 years ago
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?

Comment 7

10 years ago
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).

Updated

10 years ago
Flags: in-testsuite-

Updated

10 years ago
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.