aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-03-05 19:48:17 +0800
committerChristian Persch <chpe@src.gnome.org>2004-03-05 19:48:17 +0800
commite84ae1938ab8d79442a7f82580e3f965f78f461a (patch)
tree4af79fc8732a8b7827f219868c200e70d3a35528 /embed
parentefbcfccc35fffe945d517716db426730b7da3c6b (diff)
downloadgsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.gz
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.bz2
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.lz
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.xz
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.tar.zst
gsoc2013-epiphany-e84ae1938ab8d79442a7f82580e3f965f78f461a.zip
Don't return an error when a DOM document isn't a HTML document, it's ok
2004-03-05 Christian Persch <chpe@cvs.gnome.org> * 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).
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp3
1 files changed, 2 insertions, 1 deletions
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<nsIDOMHTMLDocument> 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<nsIDOMHTMLCollection> forms;
htmlDoc->GetForms (getter_AddRefs (forms));