mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
Fix crash caused by accessing invalid ObjectSchema
These references would eventually become invalid. The quickest fix is for them to no longer be references. The longer-term fix might be to only store the object type and dynamically retrieve the ObjectSchema only when necessary. Fixes #181
This commit is contained in:
parent
1f2eabeb1a
commit
41ef7c41a6
@ -27,7 +27,7 @@ namespace realm {
|
|||||||
public:
|
public:
|
||||||
List(SharedRealm &r, const ObjectSchema &s, LinkViewRef l) : m_realm(r), object_schema(s), m_link_view(l) {}
|
List(SharedRealm &r, const ObjectSchema &s, LinkViewRef l) : m_realm(r), object_schema(s), m_link_view(l) {}
|
||||||
|
|
||||||
const ObjectSchema &object_schema;
|
const ObjectSchema object_schema;
|
||||||
SharedRealm realm() { return m_realm; }
|
SharedRealm realm() { return m_realm; }
|
||||||
|
|
||||||
size_t size();
|
size_t size();
|
||||||
|
@ -27,7 +27,7 @@ namespace realm {
|
|||||||
template<typename ValueType, typename ContextType>
|
template<typename ValueType, typename ContextType>
|
||||||
static inline Object create(ContextType ctx, SharedRealm realm, ObjectSchema &object_schema, ValueType value, bool try_update);
|
static inline Object create(ContextType ctx, SharedRealm realm, ObjectSchema &object_schema, ValueType value, bool try_update);
|
||||||
|
|
||||||
const ObjectSchema &object_schema;
|
const ObjectSchema object_schema;
|
||||||
SharedRealm realm() { return m_realm; }
|
SharedRealm realm() { return m_realm; }
|
||||||
Row row() { return m_row; }
|
Row row() { return m_row; }
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user