mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 09:53:18 +00:00
8372977: unnecessary gthread-2.0 loading
Reviewed-by: prr, kizune
This commit is contained in:
parent
e534ee9932
commit
5ea2b64021
@ -42,7 +42,6 @@
|
||||
#include "debug_assert.h"
|
||||
|
||||
static void *gtk3_libhandle = NULL;
|
||||
static void *gthread_libhandle = NULL;
|
||||
|
||||
static void transform_detail_string (const gchar *detail,
|
||||
GtkStyleContext *context);
|
||||
@ -79,15 +78,6 @@ static void* dl_symbol(const char* name)
|
||||
return result;
|
||||
}
|
||||
|
||||
static void* dl_symbol_gthread(const char* name)
|
||||
{
|
||||
void* result = dlsym(gthread_libhandle, name);
|
||||
if (!result)
|
||||
longjmp(j, NO_SYMBOL_EXCEPTION);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
gboolean gtk3_check(const char* lib_name, gboolean load)
|
||||
{
|
||||
if (gtk3_libhandle != NULL) {
|
||||
@ -264,13 +254,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gthread_libhandle = dlopen(GTHREAD_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL);
|
||||
if (gthread_libhandle == NULL) {
|
||||
gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL);
|
||||
if (gthread_libhandle == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (setjmp(j) == 0)
|
||||
{
|
||||
fp_gtk_check_version = dl_symbol("gtk_check_version");
|
||||
@ -634,9 +617,6 @@ GtkApi* gtk3_load(JNIEnv *env, const char* lib_name)
|
||||
dlclose(gtk3_libhandle);
|
||||
gtk3_libhandle = NULL;
|
||||
|
||||
dlclose(gthread_libhandle);
|
||||
gthread_libhandle = NULL;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -735,7 +715,6 @@ static int gtk3_unload()
|
||||
|
||||
dlerror();
|
||||
dlclose(gtk3_libhandle);
|
||||
dlclose(gthread_libhandle);
|
||||
if ((gtk3_error = dlerror()) != NULL)
|
||||
{
|
||||
return FALSE;
|
||||
|
||||
@ -38,9 +38,6 @@
|
||||
#define TRUE (!FALSE)
|
||||
#endif
|
||||
|
||||
#define GTHREAD_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gthread-2.0", "0")
|
||||
#define GTHREAD_LIB JNI_LIB_NAME("gthread-2.0")
|
||||
|
||||
#define _G_TYPE_CIC(ip, gt, ct) ((ct*) ip)
|
||||
#define G_TYPE_CHECK_INSTANCE_CAST(instance, g_type, c_type) \
|
||||
(_G_TYPE_CIC ((instance), (g_type), c_type))
|
||||
@ -850,9 +847,6 @@ typedef struct GtkApi {
|
||||
gboolean gtk_load(JNIEnv *env, GtkVersion version, gboolean verbose);
|
||||
gboolean gtk_check_version(GtkVersion version);
|
||||
|
||||
typedef struct _GThreadFunctions GThreadFunctions;
|
||||
static gboolean (*fp_g_thread_get_initialized)(void);
|
||||
static void (*fp_g_thread_init)(GThreadFunctions *vtable);
|
||||
static void (*fp_gdk_threads_init)(void);
|
||||
static void (*fp_gdk_threads_enter)(void);
|
||||
static void (*fp_gdk_threads_leave)(void);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user