Skip to content

Commit

Permalink
fix: not working JSCoreGTK proxy_execute_* after global reinitialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sergio-nsk committed Dec 25, 2024
1 parent 654a63f commit 6c0d56a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions execute_jsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ bool proxy_execute_jsc_global_cleanup(void) {
dlclose(g_proxy_execute_jsc.module);

memset(&g_proxy_execute_jsc, 0, sizeof(g_proxy_execute_jsc));
g_proxy_execute_jsc_init_flag = PTHREAD_ONCE_INIT;
return true;
}

Expand Down
3 changes: 3 additions & 0 deletions execute_jscore.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ bool proxy_execute_jscore_global_cleanup(void) {
dlclose(g_proxy_execute_jscore.module);

memset(&g_proxy_execute_jscore, 0, sizeof(g_proxy_execute_jscore));

static const pthread_once_t proxy_execute_jscore_init_flag = PTHREAD_ONCE_INIT;
memcpy(&g_proxy_execute_jscore_init_flag, &proxy_execute_jscore_init_flag, sizeof(proxy_execute_jscore_init_flag));
return true;
}

Expand Down

0 comments on commit 6c0d56a

Please sign in to comment.