Commits


Gil authored and GitHub committed 7f84e84bf95
Fixes for issues discovered in the Unity desktop build (#4795) * Make Filesystem's destructor virtual * Avoid capturing a strong reference to FirestoreClient in GC tasks. This prevents this task from keeping the FirestoreClient alive even after the api::Firestore instance has been destroyed. * Ensure that FirestoreClient is terminated In the public C++ API, it's possible to delete the owning FirebaseApp which triggers the destruction of the api::Firestore object even though we haven't called Terminate. This makes it such that api::Firestore calls a blocking Terminate call on FirestoreClient in its destructor. Additionally, change AsyncQueue to always run the operation enqueued on shutdown, even if already shutdown. Make FirestoreClient capable of short circuiting the termination work for itself. This makes terminate idempotent in a more staightforward way. * Clean up excess logging * Remove defintion of weak_from_this * Review feedback * Make AsyncQueue extend std::enable_shared_from_this Also hide the AsyncQueue's public constructor and force all users to manage their reference to it via std::shared_ptr. * Handle Executor shutdown from within its own pool