Invalidated context may be used in query observer callback
Description
After was fixed in LiteCore, we have seen that if the change callback is called after the c4queryobserver is disabled and the context object passed to th c4queryobserver is released (freed), the already-freed context object will be used and cause the crash.
The usage scenario that could cause the problem is when the query's listener token is removed at the same time that there is a new query's result change to be notified.
Build couchbase-lite-ios-3.2.0-103 contains couchbase-lite-ios commit 12dfb61 with commit message: : Fix a released query context may be used in observer callback (#3285)
Fixed
Pinned fields
Click on the next to a field label to start pinning.
After was fixed in LiteCore, we have seen that if the change callback is called after the c4queryobserver is disabled and the context object passed to th c4queryobserver is released (freed), the already-freed context object will be used and cause the crash.
The usage scenario that could cause the problem is when the query's listener token is removed at the same time that there is a new query's result change to be notified.