nsresult nsBindingValues::SetBindingSet(RDFBindingSet* aBindings) { ClearBindingSet(); int32_t count = aBindings->Count(); if (count) { mValues = new nsCOMPtr<nsIRDFNode>[count]; mBindings = aBindings; } else { mValues = nullptr; } return NS_OK; }
nsresult nsBindingValues::SetBindingSet(RDFBindingSet* aBindings) { ClearBindingSet(); PRInt32 count = aBindings->Count(); if (count) { mValues = new nsCOMPtr<nsIRDFNode>[count]; if (!mValues) return NS_ERROR_OUT_OF_MEMORY; mBindings = aBindings; } else { mValues = nullptr; } return NS_OK; }
nsBindingValues::~nsBindingValues() { ClearBindingSet(); MOZ_COUNT_DTOR(nsBindingValues); }