urlString = env->NewStringUTF((const char *) charResult);
urlString = ::util_NewStringUTF(env, (const char *) charResult);
JNIEXPORT jstring JNICALL Java_org_mozilla_webclient_wrapper_1native_HistoryImpl_nativeGetURLForIndex(JNIEnv *env, jobject obj, jint webShellPtr, jint historyIndex){    JNIEnv	*	pEnv = env;    jobject		jobj = obj;    char	*	charResult = nsnull;    jstring		urlString = nsnull;        WebShellInitContext* initContext = (WebShellInitContext *) webShellPtr;        if (initContext == nsnull) {      ::util_ThrowExceptionToJava(env, "Exception: null webShellPtr passed to raptorWebShellGetURL");      return nsnull;    }        if (initContext->initComplete) {        wsGetURLForIndexEvent * actionEvent =             new wsGetURLForIndexEvent(initContext->sessionHistory,                                      historyIndex);      PLEvent	   	  	* event       = (PLEvent*) *actionEvent;            charResult = (char *) ::util_PostSynchronousEvent(initContext, event);            if (charResult != nsnull) {	urlString = env->NewStringUTF((const char *) charResult);      }      else {	::util_ThrowExceptionToJava(env, "raptorWebShellGetURL Exception: GetURL() returned nsnull");	return nsnull;      }            nsCRT::free(charResult);    }        return urlString;}