void MessageRunnable::execute(JNIEnv* env) {   nsIThreadManager* threadManager = NULL; if (theServiceManager->GetService(nsIJVMManager::GetCID(), NS_GET_IID(nsIThreadManager), (nsISupports**)&threadManager) == NS_OK) { threadManager->PostEvent(mThreadID, this, PR_FALSE); theServiceManager->ReleaseService(nsIJVMManager::GetCID(), threadManager); } }
virtual void execute(JNIEnv* env) {  MRJSecurityContext* securityContext = getSecurityContext(mPluginInstance); nsILiveconnect* connection = securityContext->getConnection(); jobject jresult = NULL; nsresult result = connection->Call(env, mObject, mFunctionName, mLength, mJavaArgs, NULL, 0, securityContext, &jresult); if (result == NS_OK) *mJavaResult = ToGlobalRef(env, jresult); }
void MessageRunnable::execute(JNIEnv* env){	// because a spontaneous Java thread called us, we have to switch to the JavaScript thread	// to handle this request.	nsIThreadManager* threadManager = NULL;	if (theServiceManager->GetService(nsIJVMManager::GetCID(), NS_GET_IID(nsIThreadManager), (nsISupports**)&threadManager) == NS_OK) {		threadManager->PostEvent(mThreadID, this, PR_FALSE);		theServiceManager->ReleaseService(nsIJVMManager::GetCID(), threadManager);	}}