Subj : JS_DefineFunction creates its own JSObject To : netscape.public.mozilla.jseng From : Alain Frisch Date : Thu May 19 2005 04:01 pm Hello, SpiderMonkey references says: << JS_GetFunctionObject retrieves the object for a specified function pointer, fun. All functions are associated with an underlying object. For functions you create with JS_NewFunction, the object is automatically created for you. For functions you define with JS_DefineFunction and JS_DefineFunctions, you specify the object(s) as a parameter. >> However, reading the source code, it seems to me that JS_DefineFunction does create a fresh JSObject for the function (js_DefineFunction pass NULL as the second argument to js_NewFunction). Can somebody confirm this is indeed the case? -- Alain Frisch .