Closed Bug 591961 Opened 14 years ago Closed 7 years ago

Allow to specify Javascript version when using jsdIStackFrame.eval()

Categories

(Core :: JavaScript Engine, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Honza, Unassigned)

References

Details

This has been originally reported as Firebug issue here:
Issue 3358: let statements

It would be useful to specify which JS version should be used for evaluating. Something, which is already possible to do for <script> tags as follows:

<!-- Use version = 1.7 -->
<script type="application/javascript;version=1.7">
    let a='bar';
    console.log(a);
</script> 

The version could be specified as an additional argument to jsdIStackFrame.eval

boolean eval (in AString bytes, in AUTF8String fileName, in unsigned long line, out jsdIValue result);

Based on proposal here:
http://groups.google.com/group/mozilla.dev.apps.firefox/browse_thread/thread/b26ae02dc1baa707?hl=en

Not sure if this would also affect window.eval()

Honza
Perhaps this could be part of new JSD2 effort?

I guess it could also be interesting for the Web Console.

Honza
Assignee: general → nobody
Component: JavaScript Engine → JavaScript Debugging APIs
QA Contact: general → jsd
it shouldn't affect window.eval - that's an api we share with other vendors (MS, Apple, ...).

I guess we could add an [optional] for it. I don't personally like messing with well established functions. You happen to be JS based and don't care, but not everyone is (and while [optional] doesn't break builds, it doesn't make method calls from C++ easy). I'd personally prefer at least initially to just add another method for it.
> I'd personally prefer at least initially to just add another method for it.
Agree

Honza
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
The new Firebug issue, that summarizes the problems caused by this lack of support is http://code.google.com/p/fbug/issues/detail?id=2244.

Sebastian
JavaScript versions are going to be retired soon, see bug 867609, so marking this as WONTFIX.

Sebastian
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
See Also: → 1JS
You need to log in before you can comment on or make changes to this bug.