jstring jresult = NULL; nsresult status = connection->ToString(env, mObject, &jresult); if (status == NS_OK && jresult != NULL) *mStringResult = (jstring) ToGlobalRef(env, jresult);
jobject member; nsresult result = connection->GetSlot(env, mObject, mSlot, NULL, 0, securityContext, &member); if (result == NS_OK) {  *mResultObject = ToGlobalRef(env, member); }
    virtual void execute(JNIEnv* env)    {        MRJSecurityContext* securityContext = getSecurityContext(mPluginInstance);        nsILiveconnect* connection = getLiveconnectInstance(securityContext);        jstring jresult = NULL;        nsresult status = connection->ToString(env, mObject, &jresult);        if (status == NS_OK && jresult != NULL)            *mStringResult = (jstring) ToGlobalRef(env, jresult);    }