Subj : Re: How does object persistance work over multiple contexts? To : netscape.public.mozilla.jseng From : Jens Thiele Date : Thu Nov 18 2004 12:28 pm Joseph Smith schrieb: > Hello, > [...] > (http://sourceforge.net/docman/display_doc.php?docid=10853&group_id=50913). not answering your question but please note that the example has a small bug: JSBool JSCustomer::computeReduction(...) { JSCustomer *p = JS_GetPrivate(cx, obj); this shouldn't compile at all and probably should be: JSCustomer *p = (JSCustomer *)JS_GetPrivate(cx, obj); But this cast is unsafe and you must ensure that the object passed is in fact of the right JSClass - to do this you might use: JS_GET_CLASS(cx,obj) == &JSCustomer::customerClass Jens .