Convert correct usage of |nsCOMPtr<T>::operator&| to use |address_of| since the operator& will soon become private. b=59414 r=disttsc@bart.nl sr=brendan@mozilla.org

This commit is contained in:
dbaron%fas.harvard.edu 2000-12-17 16:02:58 +00:00
Родитель 63ed7943d0
Коммит 12d46e3f6a
4 изменённых файлов: 12 добавлений и 10 удалений

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

@ -1379,7 +1379,7 @@ XULContentSinkImpl::ParseTag(const nsAReadableString& aText, nsINodeInfo*& aNode
}
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_FAILED(rv)) return rv;
PRInt32 namespaceID;
@ -1415,7 +1415,7 @@ XULContentSinkImpl::NormalizeAttributeString(const nsAReadableString& aText,
prefix = dont_AddRef( NS_NewAtom(prefixStr) );
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_FAILED(rv)) return rv;
rv = ns->FindNameSpaceID(prefix, nameSpaceID);
@ -1442,7 +1442,7 @@ XULContentSinkImpl::CreateElement(nsINodeInfo *aNodeInfo,
element->mDocument = mPrototype;
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_SUCCEEDED(rv)) {
element->mNameSpace = ns;
}

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

@ -2634,13 +2634,14 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsString& aInputStr
nsCOMPtr<nsIDOMNode> fragmentAsNode;
PRInt32 rangeStartHint, rangeEndHint;
res = CreateDOMFragmentFromPaste(nsrange, inputString, aContextStr, aInfoStr,
&fragmentAsNode, &rangeStartHint, &rangeEndHint);
address_of(fragmentAsNode),
&rangeStartHint, &rangeEndHint);
NS_ENSURE_SUCCESS(res, res);
// make a list of what nodes in docFrag we need to move
nsCOMPtr<nsISupportsArray> nodeList;
res = CreateListOfNodesToPaste(fragmentAsNode, &nodeList, rangeStartHint, rangeEndHint);
res = CreateListOfNodesToPaste(fragmentAsNode, address_of(nodeList), rangeStartHint, rangeEndHint);
NS_ENSURE_SUCCESS(res, res);
// are there any table elements in the list?

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

@ -2634,13 +2634,14 @@ nsresult nsHTMLEditor::InsertHTMLWithCharsetAndContext(const nsString& aInputStr
nsCOMPtr<nsIDOMNode> fragmentAsNode;
PRInt32 rangeStartHint, rangeEndHint;
res = CreateDOMFragmentFromPaste(nsrange, inputString, aContextStr, aInfoStr,
&fragmentAsNode, &rangeStartHint, &rangeEndHint);
address_of(fragmentAsNode),
&rangeStartHint, &rangeEndHint);
NS_ENSURE_SUCCESS(res, res);
// make a list of what nodes in docFrag we need to move
nsCOMPtr<nsISupportsArray> nodeList;
res = CreateListOfNodesToPaste(fragmentAsNode, &nodeList, rangeStartHint, rangeEndHint);
res = CreateListOfNodesToPaste(fragmentAsNode, address_of(nodeList), rangeStartHint, rangeEndHint);
NS_ENSURE_SUCCESS(res, res);
// are there any table elements in the list?

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

@ -1379,7 +1379,7 @@ XULContentSinkImpl::ParseTag(const nsAReadableString& aText, nsINodeInfo*& aNode
}
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_FAILED(rv)) return rv;
PRInt32 namespaceID;
@ -1415,7 +1415,7 @@ XULContentSinkImpl::NormalizeAttributeString(const nsAReadableString& aText,
prefix = dont_AddRef( NS_NewAtom(prefixStr) );
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_FAILED(rv)) return rv;
rv = ns->FindNameSpaceID(prefix, nameSpaceID);
@ -1442,7 +1442,7 @@ XULContentSinkImpl::CreateElement(nsINodeInfo *aNodeInfo,
element->mDocument = mPrototype;
nsCOMPtr<nsINameSpace> ns;
rv = GetTopNameSpace(&ns);
rv = GetTopNameSpace(address_of(ns));
if (NS_SUCCEEDED(rv)) {
element->mNameSpace = ns;
}