Skip to content

Commit

Permalink
Cancel callbacks for messaging (#745)
Browse files Browse the repository at this point in the history
* Cancel callbacks for messaging

util::Terminate is referenced counted som when there ar more APIs than messaging active the callbacks will not be canceled until later and still cause a NULL ref due to the FutureData being destroyed now.

* Cancel callback earlier

* Update readme
  • Loading branch information
TBarendt authored Nov 18, 2021
1 parent a219a97 commit 618a317
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions messaging/src/android/cpp/messaging.cc
Original file line number Diff line number Diff line change
Expand Up @@ -677,6 +677,7 @@ void Terminate() {
}
internal::UnregisterTerminateOnDefaultAppDestroy();
JNIEnv* env = g_app->GetJNIEnv();
util::CancelCallbacks(env, kApiIdentifier);
// Dereference the app.
{
MutexLock lock(g_app_mutex);
Expand Down
2 changes: 2 additions & 0 deletions release_build_files/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ code.
([#737](https://github.com/firebase/firebase-cpp-sdk/issues/737))
- Messaging (Android): Fixed crash during termination.
([#739](https://github.com/firebase/firebase-cpp-sdk/pull/739))
([#745](https://github.com/firebase/firebase-cpp-sdk/pull/745))


### 8.7.0
- Changes
Expand Down

0 comments on commit 618a317

Please sign in to comment.