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


git-svn-id: svn://10.0.0.236/trunk@212513 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pedemont%us.ibm.com
2006-09-27 15:11:16 +00:00
parent 1bc20f3d28
commit 46447edf37

View File

@@ -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;