From e48e0b19f75855bc57e122a558c4a317254144e1 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 28 Nov 2016 07:42:41 -0800 Subject: [PATCH 1/4] fixes for latest object store update --- src/js_realm.hpp | 4 +++- src/js_sync.hpp | 2 +- src/object-store | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js_realm.hpp b/src/js_realm.hpp index 013c4e6c..86ed3e04 100644 --- a/src/js_realm.hpp +++ b/src/js_realm.hpp @@ -62,7 +62,9 @@ class RealmDelegate : public BindingContext { using ObjectDefaultsMap = typename Schema::ObjectDefaultsMap; using ConstructorMap = typename Schema::ConstructorMap; - virtual void did_change(std::vector const& observers, std::vector const& invalidated) { + virtual void did_change(std::vector const& observers, + std::vector const& invalidated, + bool version_changed=true) { notify("change"); } virtual std::vector get_observed_rows() { diff --git a/src/js_sync.hpp b/src/js_sync.hpp index 253ef85c..6fd0ac28 100644 --- a/src/js_sync.hpp +++ b/src/js_sync.hpp @@ -303,7 +303,7 @@ void SyncClass::populate_sync_config(ContextType ctx, ObjectType realm_constr // FIXME - use make_shared config.sync_config = std::shared_ptr( - new SyncConfig(shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler) + new SyncConfig({shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler, [=](int error_code, std::string message, SyncSessionError) {}}) ); config.schema_mode = SchemaMode::Additive; config.path = realm::SyncManager::shared().path_for_realm(shared_user->identity(), raw_realm_url); diff --git a/src/object-store b/src/object-store index aa6b8ee6..a61a0de0 160000 --- a/src/object-store +++ b/src/object-store @@ -1 +1 @@ -Subproject commit aa6b8ee613e79c664bc59717ac84de8b33619594 +Subproject commit a61a0de00ffb15d9437629368dbaaef4ac40403a From 0b69a38f8be570b55ac0424e0e29508aa169c955 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 28 Nov 2016 08:41:45 -0800 Subject: [PATCH 2/4] fix for node/linux --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index afc0e146..4a822e68 100644 --- a/binding.gyp +++ b/binding.gyp @@ -68,7 +68,7 @@ "conditions": [ ["OS=='linux'", { "sources": [ - "src/object-store/src/impl/android/external_commit_helper.cpp", + "src/object-store/src/impl/epoll/external_commit_helper.cpp", ] }], ["OS=='mac'", { From 0f8536f23ce40b2797662a8ea8598b0da62e3c59 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 28 Nov 2016 09:02:15 -0800 Subject: [PATCH 3/4] fix for node/osx --- src/object-store | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/object-store b/src/object-store index a61a0de0..ddf845eb 160000 --- a/src/object-store +++ b/src/object-store @@ -1 +1 @@ -Subproject commit a61a0de00ffb15d9437629368dbaaef4ac40403a +Subproject commit ddf845eb23884f6644d15c896952ee0f5ea5ad57 From 6ed6b77b52993a13f1a932e3bb6f91afba78ee63 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Mon, 28 Nov 2016 10:40:50 -0800 Subject: [PATCH 4/4] Remove unneccesary braces --- src/js_sync.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/js_sync.hpp b/src/js_sync.hpp index 6fd0ac28..5b0cdf01 100644 --- a/src/js_sync.hpp +++ b/src/js_sync.hpp @@ -302,8 +302,7 @@ void SyncClass::populate_sync_config(ContextType ctx, ObjectType realm_constr std::string raw_realm_url = Object::validated_get_string(ctx, sync_config_object, "url"); // FIXME - use make_shared - config.sync_config = std::shared_ptr( - new SyncConfig({shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler, [=](int error_code, std::string message, SyncSessionError) {}}) + config.sync_config = std::shared_ptr(new SyncConfig{shared_user, raw_realm_url, SyncSessionStopPolicy::AfterChangesUploaded, handler, [=](int error_code, std::string message, SyncSessionError) {}} ); config.schema_mode = SchemaMode::Additive; config.path = realm::SyncManager::shared().path_for_realm(shared_user->identity(), raw_realm_url);