jboolean is_copy; const jchar* property_name_ucs2 = env->GetStringChars(property_name_jstr, &is_copy); jsize property_name_len = env->GetStringLength(property_name_jstr);  jsobject js_obj = Unwrap_JSObject(env, java_wrapper_obj); java_obj = ToGlobalRef(env, java_obj); SetMemberMessage msg(js_obj, property_name_ucs2, property_name_len, java_obj);  sendMessage(env, &msg);  env->DeleteGlobalRef(java_obj); env->ReleaseStringChars(property_name_jstr, property_name_ucs2);
MRJPluginInstance* pluginInstance = GetCurrentInstance(env); if (pluginInstance == NULL) { env->ThrowNew(env->FindClass("java/lang/NullPointerException"), "illegal JNIEnv (can't find plugin)"); return; }   jboolean is_copy; const jchar* property_name_ucs2 = env->GetStringChars(property_name_jstr, &is_copy); jsize property_name_len = env->GetStringLength(property_name_jstr);  jsobject js_obj = Unwrap_JSObject(env, java_wrapper_obj); java_obj = ToGlobalRef(env, java_obj);  SetMemberMessage msg(pluginInstance, js_obj, property_name_ucs2, property_name_len, java_obj); sendMessage(env, &msg);  env->DeleteGlobalRef(java_obj); env->ReleaseStringChars(property_name_jstr, property_name_ucs2);
Java_netscape_javascript_JSObject_setMember(JNIEnv* env,                                            jobject java_wrapper_obj,                                            jstring property_name_jstr,                                            jobject java_obj){	if (property_name_jstr == NULL) {		env->ThrowNew(env->FindClass("java/lang/NullPointerException"), "illegal null member name");		return;	}	/* Get the Unicode string for the JS property name */	jboolean is_copy;	const jchar* property_name_ucs2 = env->GetStringChars(property_name_jstr, &is_copy);	jsize property_name_len = env->GetStringLength(property_name_jstr);		jsobject js_obj = Unwrap_JSObject(env, java_wrapper_obj);	java_obj = ToGlobalRef(env, java_obj);	SetMemberMessage msg(js_obj, property_name_ucs2, property_name_len, java_obj);		sendMessage(env, &msg);		env->DeleteGlobalRef(java_obj);	env->ReleaseStringChars(property_name_jstr, property_name_ucs2);}