bugId 17329

Added PlugletSecurityContext class.
Set ProxyJNI security context to PlugletSecurityContext
(see 15902)


git-svn-id: svn://10.0.0.236/trunk@51969 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
1999-10-27 09:33:06 +00:00
parent a036d65c5c
commit 3b03dc263a
5 changed files with 106 additions and 1 deletions

View File

@@ -18,6 +18,7 @@
#include "nsIServiceManager.h"
#include "prenv.h"
#include "PlugletManager.h"
#include "ProxyJNI.h"
static NS_DEFINE_IID(kIPluginIID,NS_IPLUGIN_IID);
static NS_DEFINE_CID(kPluginCID,NS_PLUGIN_CID);
@@ -41,6 +42,7 @@ PRInt32 PlugletEngine::lockCount = 0;
PlugletEngine * PlugletEngine::engine = NULL;
nsIPluginManager *PlugletEngine::pluginManager = NULL;
jobject PlugletEngine::plugletManager = NULL;
PlugletSecurityContext *PlugletEngine::securityContext = NULL;
NS_IMPL_ISUPPORTS(PlugletEngine,kIPluginIID);
NS_METHOD PlugletEngine::Initialize(void) {
@@ -169,6 +171,11 @@ JNIEnv * PlugletEngine::GetJNIEnv(void) {
return NULL;
}
jvmManager->CreateProxyJNI(NULL,&res);
if (!securityContext) {
securityContext = new PlugletSecurityContext();
}
::SetSecurityContext(res,securityContext);
//nb error handling
//#endif
#if 0