ports/92467: [PATCH]: www/firefox uses 100% CPU when opening files sometimes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

ports/92467: [PATCH]: www/firefox uses 100% CPU when opening files sometimes

Stijn Hoop

>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<nsIWidget> 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:
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports-bugs
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: ports/92467: [PATCH]: www/firefox uses 100% CPU when opening files sometimes

Erwin Lansing
Synopsis: [PATCH]: www/firefox uses 100% CPU when opening files sometimes

Responsible-Changed-From-To: freebsd-ports-bugs->gnome
Responsible-Changed-By: erwin
Responsible-Changed-When: Sat Jan 28 20:43:14 UTC 2006
Responsible-Changed-Why:
Over to maintainers.

http://www.freebsd.org/cgi/query-pr.cgi?pr=92467
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-gnome
To unsubscribe, send any mail to "[hidden email]"