diff --git a/src/jsi/jsi_class.hpp b/src/jsi/jsi_class.hpp index ccd5f22787..79675f1272 100644 --- a/src/jsi/jsi_class.hpp +++ b/src/jsi/jsi_class.hpp @@ -490,7 +490,9 @@ class ObjectWrap { static Internal* get_internal(JsiEnv env, const JsiObj& object) { - auto internal = object->getProperty(env, g_internal_field); + static const auto js_internal_field = fbjsi::String::createFromAscii(env, g_internal_field); + + auto internal = object->getProperty(env, js_internal_field); if (internal.isUndefined()) { // In the case of a user opening a Realm with a class-based model, // the user defined constructor will get called before the "internal" property has been set. @@ -663,7 +665,8 @@ class ObjectWrap { } // namespace realmjsi template -class ObjectWrap : public realm::js::realmjsi::ObjectWrap {}; +class ObjectWrap : public realm::js::realmjsi::ObjectWrap { +}; template fbjsi::Value wrap(fbjsi::Runtime& rt, const fbjsi::Value& thisVal, const fbjsi::Value* args, size_t count)