mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
pr fixes
This commit is contained in:
parent
0089b3207c
commit
8709f04e8b
@ -125,7 +125,6 @@ void delete_all_realms();
|
||||
|
||||
template<typename T>
|
||||
class RealmClass : public ClassDefinition<T, SharedRealm> {
|
||||
public:
|
||||
using GlobalContextType = typename T::GlobalContext;
|
||||
using ContextType = typename T::Context;
|
||||
using FunctionType = typename T::Function;
|
||||
@ -137,6 +136,7 @@ class RealmClass : public ClassDefinition<T, SharedRealm> {
|
||||
using ReturnValue = js::ReturnValue<T>;
|
||||
using NativeAccessor = realm::NativeAccessor<ValueType, ContextType>;
|
||||
|
||||
public:
|
||||
static FunctionType create_constructor(ContextType);
|
||||
|
||||
// methods
|
||||
|
@ -92,6 +92,8 @@ Results::~Results()
|
||||
|
||||
bool Results::is_valid() const
|
||||
{
|
||||
if (m_realm)
|
||||
m_realm->verify_thread();
|
||||
if (m_table && !m_table->is_attached())
|
||||
return false;
|
||||
if (m_mode == Mode::TableView && (!m_table_view.is_attached() || m_table_view.depends_on_deleted_object()))
|
||||
@ -104,8 +106,6 @@ bool Results::is_valid() const
|
||||
|
||||
void Results::validate_read() const
|
||||
{
|
||||
if (m_realm)
|
||||
m_realm->verify_thread();
|
||||
if (!is_valid())
|
||||
throw InvalidatedException();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user