bug 295531: Assert that we will have at least one node to paste. Triggering this assertion probably means the HTML parser is throwing away data. r=brade sr=smfr a=shaver

git-svn-id: svn://10.0.0.236/trunk@173998 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-06-01 22:39:35 +00:00
parent 3561d0632c
commit 23338fd153

View File

@@ -219,7 +219,7 @@ NS_IMETHODIMP nsHTMLEditor::LoadHTML(const nsAString & aInputString)
nsCOMPtr<nsIDOMDocumentFragment> docfrag;
{
res = nsrange->CreateContextualFragment(aInputString, getter_AddRefs(docfrag));
NS_ENSURE_SUCCESS(res, res);
NS_ENSURE_SUCCESS(res, res);
}
// put the fragment into the document
nsCOMPtr<nsIDOMNode> parent, junk;
@@ -387,6 +387,8 @@ nsHTMLEditor::InsertHTMLWithContext(const nsAString & aInputString,
streamEndParent, streamEndOffset);
NS_ENSURE_SUCCESS(res, res);
NS_ASSERTION(nodeList.Count() > 0, "We should have at least one node here.");
// walk list of nodes; perform surgery on nodes (relativize) with _mozattr
res = RelativizeURIInFragmentList(nodeList, aFlavor, aSourceDoc, targetNode);
// ignore results from this call, try to paste/insert anyways