Bug 353693 - nsJavaXPTCStub should use Java class' loader for loading Mozilla classes. r=apeller, a=mconnor. XULRunner only.

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@213078 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pedemont%us.ibm.com
2006-10-03 20:02:15 +00:00
parent 11f44d06fa
commit 38493d58c0
7 changed files with 96 additions and 19 deletions

View File

@@ -535,10 +535,6 @@ nsJavaXPTCStub::CallMethod(PRUint16 aMethodIndex,
// Check for exception from called Java function
jthrowable exp = env->ExceptionOccurred();
if (exp) {
#ifdef DEBUG
env->ExceptionDescribe();
#endif
// If the exception is an instance of XPCOMException, then get the
// nsresult from the exception instance. Else, default to
// NS_ERROR_FAILURE.
@@ -583,8 +579,13 @@ nsJavaXPTCStub::CallMethod(PRUint16 aMethodIndex,
if (java_params)
delete [] java_params;
LOG(("<--- (Java) %s::%s()\n", ifaceName, aMethodInfo->GetName()));
#ifdef DEBUG
if (env->ExceptionCheck())
env->ExceptionDescribe();
#endif
env->ExceptionClear();
LOG(("<--- (Java) %s::%s()\n", ifaceName, aMethodInfo->GetName()));
return rv;
}
@@ -918,7 +919,8 @@ nsJavaXPTCStub::SetupJavaParams(const nsXPTParamInfo &aParamInfo,
jobject java_stub = nsnull;
if (xpcom_obj) {
// Get matching Java object for given xpcom object
rv = GetNewOrUsedJavaObject(env, xpcom_obj, iid, &java_stub);
jobject objLoader = env->CallObjectMethod(mJavaWeakRef, getReferentMID);
rv = GetNewOrUsedJavaObject(env, xpcom_obj, iid, objLoader, &java_stub);
if (NS_FAILED(rv))
break;
}