Changeset [ee6cfb8b67d11abb1f9f37dbd64ba3b64a032057] by Paul Davis
Revision ee6cfb8b67d11abb1f9f37dbd64ba3b64a032057,
committed by Paul Davis
· May 17th, 2009 @ 04:59 PM
Fixes global handling of "function foo() {}"
JavaScript acts a bit odd in this case in that the body of 'foo' is passed to JS_Class.add_property but not JS_Class.set_property. For now I added an add_prop method that special cases when the passed in value is a function and delegates to set_prop.
While I was at it, I went ahead and added support for deleting global properties as well. If your global handler has delitem defined, it will now get called for the JavaScript statement "delete foo;"
Thanks to Riccardo Pelizzi for the bug report. http://github.com/davisp/python-...
4 changed files
-
M
THANKS -
M
spidermonkey/context.c -
M
tests/t.py -
M
tests/test-global.py