summaryrefslogtreecommitdiffstats
path: root/platform/javascript/javascript_main.cpp
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2024-11-08 15:12:33 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2024-11-08 18:17:53 +0100
commita5f6e498627e79c0bff36526440300de7aebc84b (patch)
tree1a87a0c2ecfbc77986743d99252d79f645326a1c /platform/javascript/javascript_main.cpp
parent33c02a5c6bc2a050aad0e7356ebfcdb2592f54e0 (diff)
downloadredot-engine-a5f6e498627e79c0bff36526440300de7aebc84b.tar.gz
Fix deadlocks related to ClassDB queries about global classes
`ClassDB::can_instantiate()` and other reflection methods deadlock if the type is an script global class, when such script indirectly uses a not-yet-registered class. The reason is the `ClassDB` read lock is still held when invoking the `ResourceLoader` to load the class script, which may in turn need to lock for writing (for the class registration). In particular, this happens with some types related to animation tree, that aren't registered at engine startup, but can happen with others, especially ones from the user. Registration statements are also added for the animation-related types that were lacking them.
Diffstat (limited to 'platform/javascript/javascript_main.cpp')
0 files changed, 0 insertions, 0 deletions