Subj : Re: JS_DefineFunction creates its own JSObject To : Alain Frisch From : Brendan Eich Date : Thu May 19 2005 08:21 pm Alain Frisch wrote: > 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? That's one of the stupidest lies in the API docs. Oh well. Soon enough, by going to http://developer-test.mozilla.org (or when it launches, http://developer.mozilla.org), with a sign-in, you will be able to fix that. So will I. In the mean time, I'm actually not going to have time to run through the manual-effort exercise of hacking on http://lxr.mozilla.org/mozilla/source/js/docs/jsref.xml and re-gening the docs. But your mail is a great reminder. Fwd'ing to the right people to keep a stack of these fixmes. /be .