зеркало из https://github.com/mozilla/pjs.git
Fix for bug 17937. nsHTMLEditor::DeleteSelectionAndCreateNode() wasn't addref'ing an out parameter. r=sfraser.
This commit is contained in:
Родитель
42b105a390
Коммит
ef4a4e4872
|
@ -1634,6 +1634,7 @@ nsHTMLEditor::DeleteSelectionAndCreateNode(const nsString& aTag,
|
||||||
getter_AddRefs(newNode));
|
getter_AddRefs(newNode));
|
||||||
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
|
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
|
||||||
*aNewNode = newNode;
|
*aNewNode = newNode;
|
||||||
|
NS_IF_ADDREF(*aNewNode);
|
||||||
|
|
||||||
// we want the selection to be just after the new node
|
// we want the selection to be just after the new node
|
||||||
nsCOMPtr<nsIDOMSelection> selection;
|
nsCOMPtr<nsIDOMSelection> selection;
|
||||||
|
|
|
@ -1634,6 +1634,7 @@ nsHTMLEditor::DeleteSelectionAndCreateNode(const nsString& aTag,
|
||||||
getter_AddRefs(newNode));
|
getter_AddRefs(newNode));
|
||||||
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
|
// XXX: ERROR_HANDLING check result, and make sure aNewNode is set correctly in success/failure cases
|
||||||
*aNewNode = newNode;
|
*aNewNode = newNode;
|
||||||
|
NS_IF_ADDREF(*aNewNode);
|
||||||
|
|
||||||
// we want the selection to be just after the new node
|
// we want the selection to be just after the new node
|
||||||
nsCOMPtr<nsIDOMSelection> selection;
|
nsCOMPtr<nsIDOMSelection> selection;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче