summaryrefslogtreecommitdiff
path: root/core/class_db.h
diff options
context:
space:
mode:
authorLyuma <xn.lyuma@gmail.com>2020-11-01 00:44:15 -0700
committerLyuma <xn.lyuma@gmail.com>2020-11-01 03:40:06 -0800
commit37b6a36cc4b5a4dec6c2c2996864ca06c7f37672 (patch)
treebb68a15a143111446fd9f546a4158ee129d9ad4e /core/class_db.h
parent7bc74b0fc802368a91b6a59e4a5e0989c0f51d06 (diff)
Avoid reentrant OBJTYPE_RLOCK in ClassDB
Fixes #43020 when a thread uses ClassDB while main thread calls is_parent_class().
Diffstat (limited to 'core/class_db.h')
-rw-r--r--core/class_db.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/core/class_db.h b/core/class_db.h
index 4734b06c7a..22072066d9 100644
--- a/core/class_db.h
+++ b/core/class_db.h
@@ -164,6 +164,11 @@ public:
static HashMap<StringName, HashMap<StringName, Variant>> default_values;
static Set<StringName> default_values_cached;
+private:
+ // Non-locking variants of get_parent_class and is_parent_class.
+ static StringName _get_parent_class(const StringName &p_class);
+ static bool _is_parent_class(const StringName &p_class, const StringName &p_inherits);
+
public:
// DO NOT USE THIS!!!!!! NEEDS TO BE PUBLIC BUT DO NOT USE NO MATTER WHAT!!!
template <class T>