Skip to content

Commit 5605290

Browse files
committed
Using string as key of class_remap to avoid crash when exit
1 parent 1efa947 commit 5605290

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

quickjs/quickjs_binder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ uint32_t QuickJSBinder::global_transfer_id = 0;
1717
HashMap<JSContext *, QuickJSBinder *, QuickJSBinder::PtrHasher> QuickJSBinder::context_binders;
1818
HashMap<JSRuntime *, JSContext *, QuickJSBinder::PtrHasher> QuickJSBinder::runtime_context_map;
1919
HashMap<uint32_t, ECMAScriptGCHandler *> QuickJSBinder::transfer_deopot;
20-
Map<StringName, const char *> QuickJSBinder::class_remap;
20+
Map<String, const char *> QuickJSBinder::class_remap;
2121

2222
JSValue QuickJSBinder::console_log_function(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) {
2323
PoolStringArray args;

quickjs/quickjs_binder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class QuickJSBinder : public ECMAScriptBinder {
162162
static HashMap<JSContext *, QuickJSBinder *, PtrHasher> context_binders;
163163
static HashMap<JSRuntime *, JSContext *, PtrHasher> runtime_context_map;
164164
static HashMap<uint32_t, ECMAScriptGCHandler *> transfer_deopot;
165-
static Map<StringName, const char *> class_remap;
165+
static Map<String, const char *> class_remap;
166166

167167
public:
168168
static JSValue variant_to_var(JSContext *ctx, const Variant p_var);

0 commit comments

Comments
 (0)