You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you call qjs::Context::registerClassafter you have torn down and recreated a QuickJS instance it will assert with an error saying that the Class ID is too high.
This is happening because js_traits<std::shared_ptr<T>>::QJSClassId is a static member and does not get reset when the qjs::Context is destroyed.
I patched it to use a map in the context to keep track of the assigned IDs and if the map has been reset then reset the js_traits<std::shared_ptr<T>>::QJSClassId to zero.
Not sure of the best way to go about this but it was a workaround for me.
If you call
qjs::Context::registerClass
after you have torn down and recreated a QuickJS instance it will assert with an error saying that the Class ID is too high.This is happening because
js_traits<std::shared_ptr<T>>::QJSClassId
is a static member and does not get reset when the qjs::Context is destroyed.I patched it to use a map in the context to keep track of the assigned IDs and if the map has been reset then reset the
js_traits<std::shared_ptr<T>>::QJSClassId
to zero.Not sure of the best way to go about this but it was a workaround for me.
The text was updated successfully, but these errors were encountered: