diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-01 19:44:46 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2023-10-01 19:44:46 +0200 |
commit | 0bbadd6883c835f8d403747125ae9d6069c72fdb (patch) | |
tree | 8808bc657b296b44561e2a5c38dde2adaaf44665 /platform/web/javascript_bridge_singleton.cpp | |
parent | 0ca8542329888e8dccba89d59d3b728090c29991 (diff) | |
download | redot-engine-0bbadd6883c835f8d403747125ae9d6069c72fdb.tar.gz |
[Web] Fix dlink_enabled build
After changing the default visibility to hidden to avoid generating
thousands of import/export symbols (browsers have a hard limit of 10k),
explicitly setting visibility for "boundary functions" (i.e. wasm
callbacks called by JS via pointer) is required to ensure the function
can be retrieved via pointer from the function table.
Diffstat (limited to 'platform/web/javascript_bridge_singleton.cpp')
-rw-r--r-- | platform/web/javascript_bridge_singleton.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/platform/web/javascript_bridge_singleton.cpp b/platform/web/javascript_bridge_singleton.cpp index 45bce1b480..2296176e77 100644 --- a/platform/web/javascript_bridge_singleton.cpp +++ b/platform/web/javascript_bridge_singleton.cpp @@ -68,11 +68,11 @@ private: int _js_id = 0; Callable _callable; - static int _variant2js(const void **p_args, int p_pos, godot_js_wrapper_ex *r_val, void **p_lock); - static void _free_lock(void **p_lock, int p_type); - static Variant _js2variant(int p_type, godot_js_wrapper_ex *p_val); - static void *_alloc_variants(int p_size); - static void _callback(void *p_ref, int p_arg_id, int p_argc); + WASM_EXPORT static int _variant2js(const void **p_args, int p_pos, godot_js_wrapper_ex *r_val, void **p_lock); + WASM_EXPORT static void _free_lock(void **p_lock, int p_type); + WASM_EXPORT static Variant _js2variant(int p_type, godot_js_wrapper_ex *p_val); + WASM_EXPORT static void *_alloc_variants(int p_size); + WASM_EXPORT static void _callback(void *p_ref, int p_arg_id, int p_argc); protected: bool _set(const StringName &p_name, const Variant &p_value) override; |