Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines | Functions
CSecureEnv.h File Reference
#include "nsISecureEnv.h"
#include "nsIThreadManager.h"
#include "SupportsMixin.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CSecureEnv

Defines

#define CSecureJNI_h___

Functions

CSecureEnvGetSecureJNI (JNIEnv *env, jobject thread)
 Returns the secure JNI associated with the current thread (if any).

Define Documentation

Definition at line 45 of file CSecureEnv.h.


Function Documentation

CSecureEnv* GetSecureJNI ( JNIEnv env,
jobject  thread 
)

Returns the secure JNI associated with the current thread (if any).

Definition at line 1975 of file CSecureEnv.cpp.

{
       CSecureEnv* secureJNI = NULL;
       
       jclass threadClass = env->GetObjectClass(thread);
       if (threadClass != NULL) {
              jfieldID fSecureEnvField = env->GetFieldID(threadClass, "fSecureEnv", "I");
              if (fSecureEnvField != NULL) {
                     secureJNI = (CSecureEnv*) env->GetIntField(thread, fSecureEnvField);
              } else {
                     env->ExceptionClear();
              }
              env->DeleteLocalRef(threadClass);
       }
       
       return secureJNI;
}

Here is the caller graph for this function: