зеркало из https://github.com/mozilla/gecko-dev.git
Reorganize bindings methods. Also, properly check error conditions in those methods.
Original committer: pedemont%us.ibm.com Original revision: 1.5 Original date: 2005/01/14 00:09:49
This commit is contained in:
Родитель
9e3f9b0611
Коммит
6eb1f11dca
|
@ -70,7 +70,7 @@ nsJavaXPTCStubWeakRef::QueryReferent(const nsIID& aIID, void** aInstancePtr)
|
|||
|
||||
// Java object has not been garbage collected. Do we have an
|
||||
// associated nsJavaXPTCStub?
|
||||
void* inst = GetMatchingXPCOMObject(mJavaEnv, javaObject);
|
||||
void* inst = gBindings->GetXPCOMObject(mJavaEnv, javaObject);
|
||||
|
||||
if (!inst) {
|
||||
// No XPTCStub exists, so create one
|
||||
|
@ -87,7 +87,7 @@ nsJavaXPTCStubWeakRef::QueryReferent(const nsIID& aIID, void** aInstancePtr)
|
|||
if (!xpcomStub)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
NS_ADDREF(xpcomStub);
|
||||
AddJavaXPCOMBinding(mJavaEnv, javaObject, SetAsXPTCStub(xpcomStub));
|
||||
gBindings->AddBinding(mJavaEnv, javaObject, SetAsXPTCStub(xpcomStub));
|
||||
|
||||
// return created stub
|
||||
*aInstancePtr = (void*) xpcomStub;
|
||||
|
|
Загрузка…
Ссылка в новой задаче