Subj : Re: [Q] How to correctly implement 'resolve' for a class.. To : t o b e From : Brendan Eich Date : Wed Oct 08 2003 10:33 am t o b e wrote: > The pseudo-code for my resolve is thus: > > fn resolve(cx, parent, id): > > if id is an object I know about: > > DefineObject(etc) > return JS_TRUE > > return JS_FALSE Never return false without reporting an error or setting a pending exception. You're causing silent script termination for any id your resolve hook doesn't know about. You might want to use JS_ResolveStandardClass and JS_EnumerateStandardClasses to lazily initialize standard class ids in the global object, instead of calling JS_InitStandardClasses up front. See the comments in jsapi.h and the usage in js.c. /be .