aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/EphyBrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'embed/mozilla/EphyBrowser.cpp')
-rw-r--r--embed/mozilla/EphyBrowser.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index 732de1c42..2f1b19d7e 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -494,12 +494,14 @@ nsresult EphyBrowser::GetPageDescriptor(nsISupports **aPageDescriptor)
nsCOMPtr<nsIDocShell> ds;
ds = do_GetInterface (mWebBrowser);
- if (!ds) return NS_ERROR_FAILURE;
- nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface(ds, &rv);
- if (!wpd || !NS_SUCCEEDED(rv)) return NS_ERROR_FAILURE;
+ nsCOMPtr<nsIWebPageDescriptor> wpd = do_QueryInterface (ds);
+ if (!wpd) return NS_ERROR_FAILURE;
+
+ *aPageDescriptor = wpd.get();
+ NS_IF_ADDREF (*aPageDescriptor);
- return wpd->GetCurrentDescriptor(aPageDescriptor);
+ return NS_OK;
}
nsresult EphyBrowser::GetDocumentUrl (nsCString &url)