Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

with statement is not supported

#32

import spidermonkey

rt = spidermonkey.Runtime()
cx = rt.new_context()

cx.execute("""
        function f(o) {
            with (o) {
                return test;
            }
        }
""");

print cx.execute("f({'test' : 'toto'});");

f = cx.execute("f");
print f({'test' : 'toto'})

Results in:

$ python test.py 
toto
Traceback (most recent call last):
  File "test.py", line 18, in <module>
    print f({'test' : 'toto'})
RuntimeError: Failed to execute JS Function.

Reported by seb · November 19th, 2009 @ 06:56 AM

State: hold
Milestone: none
Assigned to: Paul J. Davis Paul J. Davis

Activity

  1. Paul J. Davis
    Paul J. Davis
    • State changed from new to hold

    Seb,

    This won't get fixed until I upgrade to 1.8.1 or newer, which won't happen till I see some sort of official-ish release from Mozilla.

    November 19th, 2009 @ 07:41 AM

  2. Paul J. Davis
  3. seb
    seb

    What about 1.8.0rc1?

    November 19th, 2009 @ 07:51 AM

  4. Paul J. Davis
    Paul J. Davis

    It doesn't fix quite a few of the issues that will be solved when I move to 1.8.1, and come to think of it, I don't even know if it has with statements either.

    November 19th, 2009 @ 08:13 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.