diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2004-08-05 05:15:14 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2004-08-05 05:15:14 +0800 |
commit | 92472dc6a4b9f851eed9b40106d03e0e10ee06a0 (patch) | |
tree | 9d4d62c7cce3270fcda08126d50646c0ca7662a5 | |
parent | 8e29e18e7a936a07e78d47feb33213c46e80378d (diff) | |
download | gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.gz gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.bz2 gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.lz gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.xz gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.tar.zst gsoc2013-epiphany-92472dc6a4b9f851eed9b40106d03e0e10ee06a0.zip |
Code cleanup.
2004-08-04 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/EphyBrowser.cpp:
Code cleanup.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | embed/mozilla/EphyBrowser.cpp | 18 |
2 files changed, 14 insertions, 10 deletions
@@ -1,5 +1,11 @@ 2004-08-04 Christian Persch <chpe@cvs.gnome.org> + * embed/mozilla/EphyBrowser.cpp: + + Code cleanup. + +2004-08-04 Christian Persch <chpe@cvs.gnome.org> + * src/window-commands.c: (editor_can_open_uri): Fix mem leak; noticed by Jean-François Rameau. diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp index 690a5e24c..77ceadfb1 100644 --- a/embed/mozilla/EphyBrowser.cpp +++ b/embed/mozilla/EphyBrowser.cpp @@ -163,7 +163,6 @@ NS_IMETHODIMP EphyFaviconEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) { nsCOMPtr<nsIDOMEventTarget> eventTarget; - aDOMEvent->GetTarget(getter_AddRefs(eventTarget)); nsCOMPtr<nsIDOMNode> node = do_QueryInterface(eventTarget); @@ -177,19 +176,17 @@ EphyFaviconEventListener::HandleEvent(nsIDOMEvent* aDOMEvent) NS_IMETHODIMP EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent) { - nsresult rv; - NS_ENSURE_TRUE (mOwner != NULL, NS_ERROR_FAILURE); nsCOMPtr<nsIDOMPopupBlockedEvent> popupEvent = - do_QueryInterface (aDOMEvent, &rv); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); + do_QueryInterface (aDOMEvent); + NS_ENSURE_TRUE (popupEvent, NS_ERROR_FAILURE); nsCOMPtr<nsIURI> popupWindowURI; - rv = popupEvent->GetPopupWindowURI (getter_AddRefs (popupWindowURI)); - NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); - NS_ENSURE_SUCCESS (popupWindowURI != NULL, NS_ERROR_FAILURE); + popupEvent->GetPopupWindowURI (getter_AddRefs (popupWindowURI)); + NS_ENSURE_TRUE (popupWindowURI, NS_ERROR_FAILURE); + nsresult rv; nsEmbedCString popupWindowURIString; rv = popupWindowURI->GetSpec (popupWindowURIString); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); @@ -215,16 +212,16 @@ EphyBrowser::EphyBrowser () , mPopupBlockEventListener(nsnull) , mInitialized(PR_FALSE) { + LOG ("EphyBrowser ctor (%p)", this) } EphyBrowser::~EphyBrowser () { + LOG ("EphyBrowser dtor (%p)", this) } nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) { - nsresult rv; - if (mInitialized) return NS_OK; gtk_moz_embed_get_nsIWebBrowser (mozembed, @@ -235,6 +232,7 @@ nsresult EphyBrowser::Init (GtkMozEmbed *mozembed) NS_ENSURE_TRUE (mDOMWindow, NS_ERROR_FAILURE); /* This will instantiate an about:blank doc if necessary */ + nsresult rv; nsCOMPtr<nsIDOMDocument> domDocument; rv = mDOMWindow->GetDocument (getter_AddRefs (domDocument)); NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE); |