Back to index

lightning-sunbird  0.9+nobinonly
get_jni.cpp File Reference
#include <JNIEnvTests.h>
#include <nsIServiceManager.h>

Go to the source code of this file.


nsresult GetJNI (JNIEnv **env)

Function Documentation

nsresult GetJNI ( JNIEnv **  env)

Definition at line 40 of file get_jni.cpp.

       nsIJVMManager *jvmMngr = nsnull;
       nsresult rv = NS_OK;
       *env = nsnull;
       rv = CallGetService(kJVMManagerCID, &jvmMngr);
       if (rv != NS_OK || !jvmMngr) {
              fprintf(stderr, "ERROR: Can't get JVM manager !\n");
              return NS_ERROR_FAILURE;
       if (NS_SUCCEEDED(jvmMngr->GetProxyJNI(env)) && *env)
              return NS_OK;
       fprintf(stderr, "ERROR: Can't get JNI env !\n");
       return NS_ERROR_FAILURE;

Here is the call graph for this function: