Bug 347819 r=bryner a=dbaron Change assersions hit in normal usage to non-assertions & return failure

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@206918 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
brettw%gmail.com
2006-08-08 19:17:16 +00:00
parent 4a6785d3f5
commit c60f690783
3 changed files with 18 additions and 9 deletions

View File

@@ -87,8 +87,11 @@ mozInlineSpellWordUtil::Init(nsWeakPtr aWeakEditor)
{
nsresult rv;
// getting the editor can fail commonly because the editor was detached, so
// don't assert
nsCOMPtr<nsIEditor> editor = do_QueryReferent(aWeakEditor, &rv);
NS_ENSURE_SUCCESS(rv, rv);
if (NS_FAILED(rv))
return rv;
nsCOMPtr<nsIDOMDocument> domDoc;
rv = editor->GetDocument(getter_AddRefs(domDoc));