SMJS: Use JS_THIS_OBJECT and JS_CALLEE, not argv[-1] and argv[-2]
commit380d910ad8408f9efd29b9cc2583ee165db94133
authorKalle Olavi Niemitalo <kon@iki.fi>
Sun, 18 Nov 2012 22:32:13 +0000 (19 00:32 +0200)
committerKalle Olavi Niemitalo <Kalle@Niukka.kon.iki.fi>
Sun, 18 Nov 2012 22:39:51 +0000 (19 00:39 +0200)
tree9be781cc10c0e94ce3be9c04046d296ab812eb5d
parent465923e386705254834e4488bd74b5a6b96b9a34
SMJS: Use JS_THIS_OBJECT and JS_CALLEE, not argv[-1] and argv[-2]

https://developer.mozilla.org/en-US/docs/SpiderMonkey/1.8.5 mentions
that JSNative functions must not use negative indices of argv in
SpiderMonkey 1.8.5.  Use the JS_THIS_OBJECT and JS_CALLEE macros
instead.  They are documented in
https://developer.mozilla.org/en-US/docs/SpiderMonkey/JSAPI_Reference/JSNative
src/scripting/smjs/action_object.c
src/scripting/smjs/session_object.c