From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jan 28 20:40:08 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44E1816A420 for ; Sat, 28 Jan 2006 20:40:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9607243D49 for ; Sat, 28 Jan 2006 20:40:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0SKe7OO032859 for ; Sat, 28 Jan 2006 20:40:07 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0SKe7mu032858; Sat, 28 Jan 2006 20:40:07 GMT (envelope-from gnats) Resent-Date: Sat, 28 Jan 2006 20:40:07 GMT Resent-Message-Id: <200601282040.k0SKe7mu032858@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Stijn Hoop Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D063E16A45D; Sat, 28 Jan 2006 20:39:28 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pastinakel.tue.nl (pastinakel.tue.nl [131.155.2.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id B9E7F43D49; Sat, 28 Jan 2006 20:39:27 +0000 (GMT) (envelope-from stijn@pcwin002.win.tue.nl) Received: from localhost (localhost [127.0.0.1]) by pastinakel.tue.nl (Postfix) with ESMTP id 9344314BBD8; Sat, 28 Jan 2006 21:39:26 +0100 (CET) Received: from pastinakel.tue.nl ([127.0.0.1]) by localhost (pastinakel.tue.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 37258-09; Sat, 28 Jan 2006 21:39:26 +0100 (CET) Received: from umta.win.tue.nl (umta.win.tue.nl [131.155.71.100]) by pastinakel.tue.nl (Postfix) with ESMTP id F370414BBED; Sat, 28 Jan 2006 21:39:25 +0100 (CET) Received: from pcwin002.win.tue.nl (pcwin002 [131.155.71.72]) by umta.win.tue.nl (Postfix) with ESMTP id EFE6631401C; Sat, 28 Jan 2006 21:39:25 +0100 (CET) Received: by pcwin002.win.tue.nl (Postfix, from userid 1001) id EDB9D4124; Sat, 28 Jan 2006 21:39:25 +0100 (CET) Message-Id: <20060128203925.EDB9D4124@pcwin002.win.tue.nl> Date: Sat, 28 Jan 2006 21:39:25 +0100 (CET) From: Stijn Hoop To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: gnome@FreeBSD.org Subject: ports/92467: [PATCH]: www/firefox uses 100% CPU when opening files sometimes X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Stijn Hoop List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Jan 2006 20:40:08 -0000 >Number: 92467 >Category: ports >Synopsis: [PATCH]: www/firefox uses 100% CPU when opening files sometimes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 28 20:40:06 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Stijn Hoop >Release: FreeBSD 6.0-STABLE i386 >Organization: >Environment: System: FreeBSD 6.0-STABLE #3: Thu Dec 8 09:24:38 CET 2005 >Description: - Firefox sometimes appears to stall for a few seconds, eating lots of CPU in the process. This is due to a Gecko bug apparently fixed in 1.8 but not present in FF 1.5. See mozilla's bugzilla bug 305970: https://bugzilla.mozilla.org/show_bug.cgi?id=305970 >How-To-Repeat: - Try to download lots of files? >Fix: - Add the patch below to the port and rebuild your firefox. Patch taken from Mozilla's bugzilla and made to apply to the 1.5 sources. --- widget/src/gtk2/nsWindow.cpp.orig Thu Aug 18 10:11:23 2005 +++ widget/src/gtk2/nsWindow.cpp Sat Jan 28 18:34:03 2006 @@ -148,9 +148,9 @@ GdkEventVisibility *event); static gboolean window_state_event_cb (GtkWidget *widget, GdkEventWindowState *event); -static void style_set_cb (GtkWidget *widget, - GtkStyle *previous_style, - gpointer data); +static void theme_changed_cb (GtkSettings *settings, + GParamSpec *pspec, + nsWindow *data); #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ @@ -372,6 +372,10 @@ mIsDestroyed = PR_TRUE; mCreated = PR_FALSE; + g_signal_handlers_disconnect_by_func(gtk_settings_get_default(), + (gpointer)G_CALLBACK(theme_changed_cb), + this); + // ungrab if required nsCOMPtr rollupWidget = do_QueryReferent(gRollupWindow); if (NS_STATIC_CAST(nsIWidget *, this) == rollupWidget.get()) { @@ -2434,8 +2438,16 @@ G_CALLBACK(delete_event_cb), NULL); g_signal_connect(G_OBJECT(mShell), "window_state_event", G_CALLBACK(window_state_event_cb), NULL); - g_signal_connect(G_OBJECT(mShell), "style_set", - G_CALLBACK(style_set_cb), NULL); + + g_signal_connect_after(gtk_settings_get_default(), + "notify::gtk-theme-name", + G_CALLBACK(theme_changed_cb), this); + g_signal_connect_after(gtk_settings_get_default(), + "notify::gtk-key-theme-name", + G_CALLBACK(theme_changed_cb), this); + g_signal_connect_after(gtk_settings_get_default(), + "notify::gtk-font-name", + G_CALLBACK(theme_changed_cb), this); } if (mContainer) { @@ -3916,11 +3928,9 @@ /* static */ void -style_set_cb (GtkWidget *widget, GtkStyle *previous_style, gpointer data) +theme_changed_cb (GtkSettings *settings, GParamSpec *pspec, nsWindow *data) { - nsWindow *window = get_window_for_gtk_widget(widget); - if (window) - window->ThemeChanged(); + data->ThemeChanged(); } ////////////////////////////////////////////////////////////////////// >Release-Note: >Audit-Trail: >Unformatted: