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:
pedemont%us.ibm.com 2006-09-27 15:11:16 +00:00
Родитель 9e3f9b0611
Коммит 6eb1f11dca
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

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