зеркало из https://github.com/mozilla/pjs.git
Use Recycle to free nsStrings; and fix a warning
This commit is contained in:
Родитель
0b97d181a0
Коммит
f80c32f214
|
@ -1091,7 +1091,7 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
|
|||
char* nodename = namestr.ToNewCString();
|
||||
printf("Inserting formatting for node <%s> at offset %d\n",
|
||||
nodename, offset);
|
||||
nsCRT::free(nodename);
|
||||
Recycle(nodename);
|
||||
#endif /* DEBUG_akkana */
|
||||
|
||||
//
|
||||
|
@ -1650,7 +1650,6 @@ NS_IMETHODIMP nsEditor::InsertTextImpl(const nsString& aStringToInsert)
|
|||
if ((NS_SUCCEEDED(result)) && selection)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> selectedNode;
|
||||
PRInt32 offset;
|
||||
result = selection->GetAnchorNode(getter_AddRefs(selectedNode));
|
||||
if (NS_SUCCEEDED(result) && NS_SUCCEEDED(selection->GetAnchorOffset(&offset)) && selectedNode)
|
||||
{
|
||||
|
|
|
@ -1091,7 +1091,7 @@ nsEditor::InsertFormattingForNode(nsIDOMNode* aNode)
|
|||
char* nodename = namestr.ToNewCString();
|
||||
printf("Inserting formatting for node <%s> at offset %d\n",
|
||||
nodename, offset);
|
||||
nsCRT::free(nodename);
|
||||
Recycle(nodename);
|
||||
#endif /* DEBUG_akkana */
|
||||
|
||||
//
|
||||
|
@ -1650,7 +1650,6 @@ NS_IMETHODIMP nsEditor::InsertTextImpl(const nsString& aStringToInsert)
|
|||
if ((NS_SUCCEEDED(result)) && selection)
|
||||
{
|
||||
nsCOMPtr<nsIDOMNode> selectedNode;
|
||||
PRInt32 offset;
|
||||
result = selection->GetAnchorNode(getter_AddRefs(selectedNode));
|
||||
if (NS_SUCCEEDED(result) && NS_SUCCEEDED(selection->GetAnchorOffset(&offset)) && selectedNode)
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче