env->ReleaseStringChars(function_name_jstr, function_name_ucs2);
CallMessage msg(pluginInstance, js_obj, function_name_ucs2, function_name_len, java_args, &jresult); sendMessage(env, &msg);
Java_netscape_javascript_JSObject_call(JNIEnv* env, jobject java_wrapper_obj,                                       jstring function_name_jstr, jobjectArray java_args){	if (function_name_jstr == NULL) {		env->ThrowNew(env->FindClass("java/lang/NullPointerException"), "illegal null function name");		return NULL;	}	/* Try to determine which plugin instance is responsible for this thread. This is done by checking class loaders. */	const char* codebaseURL = NULL;	MRJPluginInstance* pluginInstance = GetCurrentInstance(env);	if (pluginInstance != NULL)		codebaseURL = pluginInstance->getContext()->getDocumentBase();	/* Get the Unicode string for the JS function name */	jboolean is_copy;	const jchar* function_name_ucs2 = env->GetStringChars(function_name_jstr, &is_copy);	jsize function_name_len = env->GetStringLength(function_name_jstr);	jsobject js_obj = Unwrap_JSObject(env, java_wrapper_obj);	jobject jresult = NULL;	CallMessage msg(js_obj, function_name_ucs2, function_name_len, java_args, &jresult, codebaseURL);	sendMessage(env, &msg);	env->ReleaseStringChars(function_name_jstr, function_name_ucs2);	if (jresult != NULL)		jresult = ToLocalRef(env, jresult);	return jresult;}