Bug 1097592 - Don't use PR_FindFunctionSymbolAndLibrary to avoid app freeze, r=karlt
authorMartin Stransky <stransky@redhat.com>
Fri, 14 Nov 2014 06:32:00 +0100
changeset 240807 de71b9d01773fb6894ce754f923bdaa5d2121c3b
parent 240806 52280c60e9e3f38c4eaebab43422c4d59f408fb3
child 240808 c3f8e00d646e7ba160b9d26ddb1e2c5695370ee1
push id4311
push userraliiev@mozilla.com
push dateMon, 12 Jan 2015 19:37:41 +0000
treeherdermozilla-beta@150c9fed433b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1097592
milestone36.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1097592 - Don't use PR_FindFunctionSymbolAndLibrary to avoid app freeze, r=karlt
widget/gtk/mozgtk/mozgtk.c
widget/gtk/nsWindow.cpp
--- a/widget/gtk/mozgtk/mozgtk.c
+++ b/widget/gtk/mozgtk/mozgtk.c
@@ -116,16 +116,17 @@ STUB(gdk_x11_display_get_user_time)
 STUB(gdk_x11_display_get_xdisplay)
 STUB(gdk_x11_get_default_root_xwindow)
 STUB(gdk_x11_get_default_xdisplay)
 STUB(gdk_x11_get_xatom_by_name)
 STUB(gdk_x11_lookup_xdisplay)
 STUB(gdk_x11_screen_get_xscreen)
 STUB(gdk_x11_visual_get_xvisual)
 STUB(gdk_x11_window_lookup_for_display)
+STUB(gdk_x11_window_set_user_time)
 STUB(gdk_x11_xatom_to_atom)
 STUB(gtk_accel_label_new)
 STUB(gtk_alignment_get_type)
 STUB(gtk_alignment_new)
 STUB(gtk_alignment_set_padding)
 STUB(gtk_arrow_get_type)
 STUB(gtk_arrow_new)
 STUB(gtk_bindings_activate)
--- a/widget/gtk/nsWindow.cpp
+++ b/widget/gtk/nsWindow.cpp
@@ -1290,23 +1290,17 @@ SetUserTimeAndStartupIDForActivatedWindo
         sn_launchee_context_new(snd, gdk_screen_get_number(screen),
                                 desktopStartupID.get());
     if (!ctx) {
         sn_display_unref(snd);
         return;
     }
 
     if (sn_launchee_context_get_id_has_timestamp(ctx)) {
-        PRLibrary* gtkLibrary;
-        SetUserTimeFunc setUserTimeFunc = (SetUserTimeFunc)
-            PR_FindFunctionSymbolAndLibrary("gdk_x11_window_set_user_time", &gtkLibrary);
-        if (setUserTimeFunc) {
-            setUserTimeFunc(gdkWindow, sn_launchee_context_get_timestamp(ctx));
-            PR_UnloadLibrary(gtkLibrary);
-        }
+        gdk_x11_window_set_user_time(gdkWindow, sn_launchee_context_get_timestamp(ctx));
     }
 
     sn_launchee_context_setup_window(ctx, gdk_x11_window_get_xid(gdkWindow));
     sn_launchee_context_complete(ctx);
 
     sn_launchee_context_unref(ctx);
     sn_display_unref(snd);
 #endif