b37fa5aa76784e72682525fffdf56fa46d8c66ed
diff --git a/embed/mozilla/mozilla-embed.cpp b/embed/mozilla/mozilla-embed.cpp
index 16ef824..3e5c926 100644
--- a/embed/mozilla/mozilla-embed.cpp
+++ b/embed/mozilla/mozilla-embed.cpp
@@ -56,6 +56,7 @@ static void	mozilla_embed_class_init	(MozillaEmbedClass *klass);
 static void	mozilla_embed_init		(MozillaEmbed *gs);
 static void	mozilla_embed_destroy		(GtkObject *object);
 static void	mozilla_embed_finalize		(GObject *object);
+static void     mozilla_embed_dispose           (GObject *object);
 static void	ephy_embed_iface_init		(EphyEmbedIface *iface);
 
 static void mozilla_embed_location_changed_cb	(GtkMozEmbed *embed,
@@ -108,6 +109,7 @@ static void mozilla_embed_favicon_cb            (EphyEmbed *embed,
 static gboolean mozilla_embed_open_uri_cb       (EphyEmbed *embed,
                                                  const char *uri,
                                                  MozillaEmbed *membed);
+static void mozilla_embed_file_monitor_cancel   (MozillaEmbed *embed);
 static void impl_set_typed_address		(EphyEmbed *embed,
 						 const char *address,
 						 EphyEmbedAddressExpire expire);
@@ -375,6 +377,7 @@ mozilla_embed_class_init (MozillaEmbedClass *klass)
 
 	object_class->constructor = mozilla_embed_constructor;
 	object_class->finalize = mozilla_embed_finalize;
+        object_class->dispose = mozilla_embed_dispose;
 	object_class->get_property = mozilla_embed_get_property;
 	object_class->set_property = mozilla_embed_set_property;
 
@@ -492,6 +495,14 @@ mozilla_embed_destroy (GtkObject *object)
 }
 
 static void
+mozilla_embed_dispose (GObject *object)
+{
+        mozilla_embed_file_monitor_cancel (MOZILLA_EMBED (object));
+
+	G_OBJECT_CLASS (mozilla_embed_parent_class)->dispose (object);
+}
+
+static void
 mozilla_embed_finalize (GObject *object)
 {
 	MozillaEmbed *embed = MOZILLA_EMBED (object);
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 3f0db42..03ec351 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -614,8 +614,6 @@ ephy_tab_dispose (GObject *object)
 		priv->idle_resize_handler = 0;
 	}
 
-	ephy_tab_file_monitor_cancel (tab);
-
 	G_OBJECT_CLASS (parent_class)->dispose (object);
 }
 
