This commit is contained in:
Ari Lazier 2016-05-19 12:22:07 -07:00
parent 0089b3207c
commit 8709f04e8b
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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();
}