From e84ae1938ab8d79442a7f82580e3f965f78f461a Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 5 Mar 2004 11:48:17 +0000 Subject: Don't return an error when a DOM document isn't a HTML document, it's ok 2004-03-05 Christian Persch * embed/mozilla/EphyBrowser.cpp: Don't return an error when a DOM document isn't a HTML document, it's ok not to be one (happens for XUL docs, like about:config). --- embed/mozilla/EphyBrowser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'embed/mozilla/EphyBrowser.cpp') diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 1fea9d6fc..018293bfb 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -865,7 +865,8 @@ nsresult EphyBrowser::GetCommandState (const char *command, PRBool *enabled) nsresult EphyBrowser::GetDocumentHasModifiedForms (nsIDOMDocument *aDomDoc, PRUint32 *aNumTextFields, PRBool *aHasTextArea) { nsCOMPtr htmlDoc = do_QueryInterface(aDomDoc); - NS_ENSURE_TRUE (htmlDoc, NS_ERROR_FAILURE); + /* it's okay not to be a HTML doc (happens for XUL documents, like about:config) */ + if (!htmlDoc) return NS_OK; nsCOMPtr forms; htmlDoc->GetForms (getter_AddRefs (forms)); -- cgit v1.2.3