Skip to content

Commit b3527e4

Browse files
committed
8372977: Unnecessary gthread-2.0 loading
Backport-of: 335ca2e
1 parent 708e1a2 commit b3527e4

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

src/java.desktop/unix/native/libawt_xawt/awt/gtk3_interface.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
#include "awt.h"
4141

4242
static void *gtk3_libhandle = NULL;
43-
static void *gthread_libhandle = NULL;
4443

4544
static void transform_detail_string (const gchar *detail,
4645
GtkStyleContext *context);
@@ -77,15 +76,6 @@ static void* dl_symbol(const char* name)
7776
return result;
7877
}
7978

80-
static void* dl_symbol_gthread(const char* name)
81-
{
82-
void* result = dlsym(gthread_libhandle, name);
83-
if (!result)
84-
longjmp(j, NO_SYMBOL_EXCEPTION);
85-
86-
return result;
87-
}
88-
8979
gboolean gtk3_check(const char* lib_name, gboolean load)
9080
{
9181
if (gtk3_libhandle != NULL) {
@@ -262,13 +252,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
262252
return FALSE;
263253
}
264254

265-
gthread_libhandle = dlopen(GTHREAD_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL);
266-
if (gthread_libhandle == NULL) {
267-
gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL);
268-
if (gthread_libhandle == NULL)
269-
return FALSE;
270-
}
271-
272255
if (setjmp(j) == 0)
273256
{
274257
fp_gtk_check_version = dl_symbol("gtk_check_version");
@@ -635,9 +618,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
635618
dlclose(gtk3_libhandle);
636619
gtk3_libhandle = NULL;
637620

638-
dlclose(gthread_libhandle);
639-
gthread_libhandle = NULL;
640-
641621
return NULL;
642622
}
643623

@@ -736,7 +716,6 @@ static int gtk3_unload()
736716

737717
dlerror();
738718
dlclose(gtk3_libhandle);
739-
dlclose(gthread_libhandle);
740719
if ((gtk3_error = dlerror()) != NULL)
741720
{
742721
return FALSE;

0 commit comments

Comments
 (0)