The main motivation for this is that building error messages via string
concatenation is tedious and makes it hard to judge what the actual message
looks like when there are a lot of parts being inserted, to the extent that
I've been tempted to leave out some potentially useful information because the
code was getting unwieldy.
It also has some small functional benefits: bools are printed as true/false
rather than 1/0, and it is optimized for minimizing the compiled size.
Currently it cuts ~30 KB off librealm-object-store.dylib even with the addition
of new functionality.
constructors.
This avoids having to repeat the move constructor's logic in the move
assignment operator, and allows the copy assignment operator to compile
despite `TableViewBase`'s missing copy assignment implementation. the
copy assignment implementation can be defaulted once `TableViewBase` is
fixed.
The custom implementation was an attempt to ensure that
`m_has_used_table_view` and `m_wants_background_updates` had appropriate
intial values. Thomas pointed out that we can remove the reliance on the
initial values by ensure that `prepare_async` sets
`m_wants_background_updates`, removing the need for a custom copy
constructor.
* object-store/master:
Make Realm::is_closed() work on read-only instances
Fix for object store build issues on Android
Implement commit helper and realm notifier for Android (#69)
Build both dynamic and static libraries.
moving pegtl dependency as step 1 in install doc
update docu (install procedure)
`Realm`, and moving from a `Results` to not result in a use-after-free.
The compiler generated move-assignment operator resulted in `m_notifier`
being assigned to without first calling `CollectionNotifier::unregister`.
This left a retain cycle in place, causing the `Realm` and other objects
to leak.
`ResultsNotifier` keeps track of which `Results` it should update when a
new `TableView` becomes available. When `Results` move-assignment
operator and move-constructor transfer ownership of the
`ResultsNotifier` to a new instance they also need to update its target
so it won't attempt to update the moved-from `Results`.
The Xcode project generated by CMake doesn't create the dylib when built
as the dylib target does not contain any source files. Adding an empty
placeholder .cpp file to the target is sufficient to convince Xcode to
produce the dylib.
* Implement commit helper and realm notifier for Android
* Remove non-existent include
* Shut down the current instance when move-assigning
* Only use Android logging when on Android
* Cleanup realm_ptr when it hasn't been sent over the pipe
* Assed that WeakRealmNotifier is closed on the thread it was created on
* Typo
* Fix syntax error
* changes after code review
* Use the proper preprocessor definition for Android
* Pass the correct address to write(2)
* Explicitly handle looper events
* changes after code review
* Do not return after handling ALOOPER_EVENT_HANGUP
* Handle HANGUP after INPUT
This bug would only happen from Chrome debug mode, where consecutive calls would crash the app because the m_objects iterator would be in a bad state. This method is faster anyways.
No longer leave this up to the test. All testing passes through the runTest() function, so we use that spot to delete the Realms. It also now deletes them beforehand too since a crash in a previous run could leave a Realm in place.
The dynamic library makes it easy to verify that there are no linker
errors when building the object store, while the static library is
easier for a binding to consume.
This also tweaks how the library targets are defined to ensure that
other CMake projects that pull in the libraries automatically get the
right include paths and link to the appropriate libraries.