Skip to content

Commit

Permalink
Using string as key of class_remap to avoid crash when exit
Browse files Browse the repository at this point in the history
  • Loading branch information
Geequlim committed Dec 29, 2019
1 parent 1efa947 commit 5605290
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion quickjs/quickjs_binder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ uint32_t QuickJSBinder::global_transfer_id = 0;
HashMap<JSContext *, QuickJSBinder *, QuickJSBinder::PtrHasher> QuickJSBinder::context_binders;
HashMap<JSRuntime *, JSContext *, QuickJSBinder::PtrHasher> QuickJSBinder::runtime_context_map;
HashMap<uint32_t, ECMAScriptGCHandler *> QuickJSBinder::transfer_deopot;
Map<StringName, const char *> QuickJSBinder::class_remap;
Map<String, const char *> QuickJSBinder::class_remap;

JSValue QuickJSBinder::console_log_function(JSContext *ctx, JSValue this_val, int argc, JSValue *argv, int magic) {
PoolStringArray args;
Expand Down
2 changes: 1 addition & 1 deletion quickjs/quickjs_binder.h
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class QuickJSBinder : public ECMAScriptBinder {
static HashMap<JSContext *, QuickJSBinder *, PtrHasher> context_binders;
static HashMap<JSRuntime *, JSContext *, PtrHasher> runtime_context_map;
static HashMap<uint32_t, ECMAScriptGCHandler *> transfer_deopot;
static Map<StringName, const char *> class_remap;
static Map<String, const char *> class_remap;

public:
static JSValue variant_to_var(JSContext *ctx, const Variant p_var);
Expand Down

0 comments on commit 5605290

Please sign in to comment.