js_obj = JSJ_callbacks->map_java_object_to_js_object(jEnv, java_applet_obj, &err_msg);
if (JSJ_callbacks && JSJ_callbacks->map_java_object_to_js_object) js_obj = JSJ_callbacks->map_java_object_to_js_object(jEnv, java_applet_obj, &err_msg);
Java_netscape_javascript_JSObject_getWindow(JNIEnv *jEnv,                                            jclass js_object_class,                                            jobject java_applet_obj){    char *err_msg;    JSContext *cx = NULL;    JSObject *js_obj;    jsval js_val;    int dummy_cost;    JSBool dummy_bool;    JSErrorReporter saved_reporter;    jobject java_obj;    JSJavaThreadState *jsj_env;        jsj_env = jsj_enter_js(jEnv, java_applet_obj, NULL, &cx, NULL, &saved_reporter, NULL, 0, NULL);    if (!jsj_env)        return NULL;        err_msg = NULL;    java_obj = NULL;    js_obj = JSJ_callbacks->map_java_object_to_js_object(jEnv, java_applet_obj, &err_msg);    if (!js_obj) {        if (err_msg) {            JS_ReportError(cx, err_msg);            free(err_msg);        }        goto done;    }    js_val = OBJECT_TO_JSVAL(js_obj);    jsj_ConvertJSValueToJavaObject(cx, jEnv, js_val, jsj_get_jlObject_descriptor(cx, jEnv),                                   &dummy_cost, &java_obj, &dummy_bool);done:    if (!jsj_exit_js(cx, jsj_env, saved_reporter))        return NULL;        return java_obj;}