Skip to content

Commit 335ca2e

Browse files
committed
8372977: Unnecessary gthread-2.0 loading
Reviewed-by: rschmelter Backport-of: 5ea2b64
1 parent b549a10 commit 335ca2e

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
@@ -42,7 +42,6 @@
4242
#include "debug_assert.h"
4343

4444
static void *gtk3_libhandle = NULL;
45-
static void *gthread_libhandle = NULL;
4645

4746
static void transform_detail_string (const gchar *detail,
4847
GtkStyleContext *context);
@@ -79,15 +78,6 @@ static void* dl_symbol(const char* name)
7978
return result;
8079
}
8180

82-
static void* dl_symbol_gthread(const char* name)
83-
{
84-
void* result = dlsym(gthread_libhandle, name);
85-
if (!result)
86-
longjmp(j, NO_SYMBOL_EXCEPTION);
87-
88-
return result;
89-
}
90-
9181
gboolean gtk3_check(const char* lib_name, gboolean load)
9282
{
9383
if (gtk3_libhandle != NULL) {
@@ -264,13 +254,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
264254
return FALSE;
265255
}
266256

267-
gthread_libhandle = dlopen(GTHREAD_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL);
268-
if (gthread_libhandle == NULL) {
269-
gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL);
270-
if (gthread_libhandle == NULL)
271-
return FALSE;
272-
}
273-
274257
if (setjmp(j) == 0)
275258
{
276259
fp_gtk_check_version = dl_symbol("gtk_check_version");
@@ -637,9 +620,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
637620
dlclose(gtk3_libhandle);
638621
gtk3_libhandle = NULL;
639622

640-
dlclose(gthread_libhandle);
641-
gthread_libhandle = NULL;
642-
643623
return NULL;
644624
}
645625

@@ -738,7 +718,6 @@ static int gtk3_unload()
738718

739719
dlerror();
740720
dlclose(gtk3_libhandle);
741-
dlclose(gthread_libhandle);
742721
if ((gtk3_error = dlerror()) != NULL)
743722
{
744723
return FALSE;

0 commit comments

Comments
 (0)