nsresult rv; aResult.Clear();  PRUint32 cnt; rv = mOverlayReferences->Count(&cnt); if (NS_FAILED(rv)) return rv;  for (PRInt32 i = 0; i < PRInt32(cnt); ++i) { nsIURI* ref = NS_REINTERPRET_CAST(nsIURI*, mOverlayReferences->ElementAt(i)); aResult.AppendElement(ref); NS_RELEASE(ref); }
*aResult = mOverlayReferences; NS_ADDREF(*aResult);
nsXULPrototypeDocument::GetOverlayReferences(nsVoidArray& aResult){    nsresult rv;    aResult.Clear();    PRUint32 cnt;    rv = mOverlayReferences->Count(&cnt);    if (NS_FAILED(rv)) return rv;    for (PRInt32 i = 0; i < PRInt32(cnt); ++i) {        nsIURI* ref = NS_REINTERPRET_CAST(nsIURI*, mOverlayReferences->ElementAt(i));        aResult.AppendElement(ref);        NS_RELEASE(ref);    }    return NS_OK;}