Subj : Re: Getting function name with generic function call hook To : netscape.public.mozilla.jseng From : Brendan Eich Date : Tue Oct 28 2003 09:37 am Sterling Bates wrote: >>>Can you verify via toString that funobj is a function object, in >>>particular the one you expect? >> >>It returns "[object CBridgeMethod]" -- that could be an indicator :-/ > > > I should clarify that...CBridgeMethod is the class name I would expect, but > it says "object", not "function". I'm not sure which it's supposed to say. > It's not a function object, so JS_GetPrivate will return something other than a JSFunction*. If you build the engine with DEBUG defined, it will assert if the CBridgeMethod class lacks the JSCLASS_HAS_PRIVATE flag. If that class has private data per object, though, it won't be of the type (JSFunction) you want. Why did you expect the callee (argv[-2]) to be a function object? In what code is this pascal you've been showing run? /be .