Bug 1152066 - Remove ugly dynamic loading code now that we can assume this symbol exists. r=roc
authorBlake Kaplan <mrbkap@gmail.com>
Tue, 07 Apr 2015 16:53:30 -0700
changeset 238074 5262799d99eef295db59cf15fc022b45001d56f8
parent 238073 6950dddc0c5c00bb6c82ed8069e413e856048448
child 238075 dfb9e2a7ea9cc355a778473aa1f492fc49b5a284
push id58101
push usermrbkap@mozilla.com
push dateTue, 07 Apr 2015 23:53:51 +0000
treeherdermozilla-inbound@5262799d99ee [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1152066
milestone40.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 1152066 - Remove ugly dynamic loading code now that we can assume this symbol exists. r=roc
widget/gtk/nsBidiKeyboard.cpp
--- a/widget/gtk/nsBidiKeyboard.cpp
+++ b/widget/gtk/nsBidiKeyboard.cpp
@@ -5,57 +5,32 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "prlink.h"
 
 #include "nsBidiKeyboard.h"
 #include <gtk/gtk.h>
 
-#if (MOZ_WIDGET_GTK == 2)
-typedef gboolean (*GdkKeymapHaveBidiLayoutsType)(GdkKeymap *keymap);
-static GdkKeymapHaveBidiLayoutsType GdkKeymapHaveBidiLayouts = nullptr;
-#endif
-
 NS_IMPL_ISUPPORTS(nsBidiKeyboard, nsIBidiKeyboard)
 
 nsBidiKeyboard::nsBidiKeyboard()
 {
     Reset();
 }
 
 NS_IMETHODIMP
 nsBidiKeyboard::Reset()
 {
-#if (MOZ_WIDGET_GTK == 2)
-    PRLibrary *gtklib = nullptr;
-#if defined(MOZ_X11)
-    if (!GdkKeymapHaveBidiLayouts) {
-        GdkKeymapHaveBidiLayouts = (GdkKeymapHaveBidiLayoutsType) 
-            PR_FindFunctionSymbolAndLibrary("gdk_keymap_have_bidi_layouts",
-                                            &gtklib);
-        if (gtklib)
-            PR_UnloadLibrary(gtklib);
-    }
-#endif
-
-    mHaveBidiKeyboards = false;
-    if (GdkKeymapHaveBidiLayouts)
-        mHaveBidiKeyboards = (*GdkKeymapHaveBidiLayouts)(nullptr);
-#else
     mHaveBidiKeyboards = gdk_keymap_have_bidi_layouts(gdk_keymap_get_default());
-#endif
     return NS_OK;
 }
 
 nsBidiKeyboard::~nsBidiKeyboard()
 {
-#if (MOZ_WIDGET_GTK == 2)
-    GdkKeymapHaveBidiLayouts = nullptr;
-#endif
 }
 
 NS_IMETHODIMP
 nsBidiKeyboard::IsLangRTL(bool *aIsRTL)
 {
     if (!mHaveBidiKeyboards)
         return NS_ERROR_FAILURE;