summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--platform/web/js/libs/library_godot_javascript_singleton.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/web/js/libs/library_godot_javascript_singleton.js b/platform/web/js/libs/library_godot_javascript_singleton.js
index 1f3633461b..cbe59230ee 100644
--- a/platform/web/js/libs/library_godot_javascript_singleton.js
+++ b/platform/web/js/libs/library_godot_javascript_singleton.js
@@ -210,7 +210,9 @@ const GodotJSWrapper = {
// This is safe! JavaScript is single threaded (and using it in threads is not a good idea anyway).
GodotJSWrapper.cb_ret = null;
const args = Array.from(arguments);
- func(p_ref, GodotJSWrapper.get_proxied(args), args.length);
+ const argsProxy = GodotJSWrapper.MyProxy(args);
+ func(p_ref, argsProxy.get_id(), args.length);
+ argsProxy.unref();
const ret = GodotJSWrapper.cb_ret;
GodotJSWrapper.cb_ret = null;
return ret;