XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, nsIInterfaceInfo* info)
XPCWrappedNative::GetNewOrUsed(XPCCallContext& ccx, nsISupports* Object, XPCWrappedNativeScope* Scope, XPCNativeInterface* Interface, XPCWrappedNative** resultWrapper)
XPCNativeInterface::GetNewOrUsed(XPCCallContext& ccx, nsIInterfaceInfo* info){    AutoMarkingNativeInterfacePtr iface(ccx);    const nsIID* iid;    if(NS_FAILED(info->GetIIDShared(&iid)) || !iid)        return nsnull;    XPCJSRuntime* rt = ccx.GetRuntime();    IID2NativeInterfaceMap* map = rt->GetIID2NativeInterfaceMap();    if(!map)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        iface = map->Find(*iid);    }    if(iface)        return iface;    iface = NewInstance(ccx, info);    if(!iface)        return nsnull;    {   // scoped lock        XPCAutoLock lock(rt->GetMapLock());        XPCNativeInterface* iface2 = map->Add(iface);        if(!iface2)        {            NS_ERROR("failed to add our interface!");            DestroyInstance(ccx, rt, iface);            iface = nsnull;        }        else if(iface2 != iface)        {            DestroyInstance(ccx, rt, iface);            iface = iface2;        }    }    return iface;}