зеркало из https://github.com/mozilla/pjs.git
QI, don't case! Not part of default build.
This commit is contained in:
Родитель
bcb7ebfb53
Коммит
0df3031dd8
|
@ -182,7 +182,8 @@ XPCOM_NATIVE(NS_1NewSingletonEnumerator) (JNIEnv *env, jclass, jobject aSingleto
|
|||
|
||||
nsISupports* singleton;
|
||||
if (IsXPTCStub(inst))
|
||||
singleton = (nsISupports*) GetXPTCStubAddr(inst);
|
||||
GetXPTCStubAddr(inst)->QueryInterface(NS_GET_IID(nsISupports),
|
||||
(void**) &singleton);
|
||||
else {
|
||||
JavaXPCOMInstance* xpcomInst = (JavaXPCOMInstance*) inst;
|
||||
singleton = xpcomInst->GetInstance();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#ifdef DEBUG_pedemonte
|
||||
#define LOG(...) printf(__VA_ARGS__)
|
||||
#else
|
||||
#define LOG(format, ...)
|
||||
#define LOG(...) /* nothing */
|
||||
#endif
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче