QI, don't case! Not part of default build.

git-svn-id: svn://10.0.0.236/trunk@162399 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pedemont%us.ibm.com
2004-09-15 19:47:19 +00:00
parent 65c4d722d6
commit ace01ae230
4 changed files with 12 additions and 9 deletions

View File

@@ -175,17 +175,19 @@ RemoveXPCOMBinding(JNIEnv* env, jobject aJavaObject)
LOG("- Removing Java<->XPCOM binding (Java=0x%08x | XPCOM=0x%08x)\n",
hash, (int) xpcomObj);
nsISupports* inst = nsnull;
if (IsXPTCStub(xpcomObj)) {
return (nsISupports*) GetXPTCStubAddr(xpcomObj);
GetXPTCStubAddr(xpcomObj)->QueryInterface(NS_GET_IID(nsISupports),
(void**) &inst);
} else {
JavaXPCOMInstance* xpcomInst = (JavaXPCOMInstance*) xpcomObj;
nsISupports* inst = xpcomInst->GetInstance();
inst = xpcomInst->GetInstance();
// XXX Getting some odd thread issues when calling this. Addreffing for
// now to work around the errors.
NS_ADDREF(inst);
delete xpcomInst;
return inst;
}
return inst;
}
void