Close uv handles on the loop thread (#1125)

This commit is contained in:
Yavor Georgiev 2017-07-07 14:50:34 +02:00 committed by GitHub
parent 95da5a29f0
commit 02c19bacb2
3 changed files with 6 additions and 8 deletions

View File

@ -307,7 +307,7 @@
02022A731DA47EC8000F0C4F /* format.cpp */,
02022A741DA47EC8000F0C4F /* format.hpp */,
02022A751DA47EC8000F0C4F /* generic */,
02022A771DA47EC8000F0C4F /* node */,
02022A771DA47EC8000F0C4F /* uv */,
);
name = util;
path = src/util;
@ -337,12 +337,12 @@
path = generic;
sourceTree = "<group>";
};
02022A771DA47EC8000F0C4F /* node */ = {
02022A771DA47EC8000F0C4F /* uv */ = {
isa = PBXGroup;
children = (
02022A781DA47EC8000F0C4F /* event_loop_signal.hpp */,
);
path = node;
path = uv;
sourceTree = "<group>";
};
0270BC3D1B7CFBFD00010E03 /* RealmJS */ = {

View File

@ -128,7 +128,7 @@ typename T::Object ResultsClass<T>::create_filtered(ContextType ctx, const U &co
query_builder::ArgumentConverter<ValueType, NativeAccessor<T>> converter(accessor, &arguments[1], argc - 1);
query_builder::apply_predicate(query, predicate, converter, realm->schema(), object_schema.name);
return create_instance(ctx, realm::Results(realm, std::move(query)));
return create_instance(ctx, collection.filter(std::move(query)));
}
template<typename T>
@ -186,9 +186,7 @@ typename T::Object ResultsClass<T>::create_sorted(ContextType ctx, const U &coll
}
auto table = realm::ObjectStore::table_for_object_type(realm->read_group(), object_schema.name);
auto results = new realm::js::Results<T>(realm, collection.get_query(),
{*table, std::move(columns), std::move(ascending)});
return create_object<T, ResultsClass<T>>(ctx, results);
return create_instance(ctx, collection.sort({*table, std::move(columns), std::move(ascending)}));
}
template<typename T>

@ -1 +1 @@
Subproject commit ffc6673173ea4091f6a119ba01532b4b9fd9862f
Subproject commit 0868f93b173490138e5fd6c78c13fb1fbc5e6f7f