| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…xceptionCheck() and return NULL if an exception was thrown.
…stCrash to pick up #430, which will fix some of the integration test failures by setting the minSdkVersion of the messaging test to 16 (was 26).
❌ Integration test FAILEDRequested by @dconeybe on commit 57d29a5
|
Sorry, something went wrong.
|
Note: I'm going to ignore the test failures because they are all flakes that could not possibly be triggered by this PR. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This PR fixes a bug in GetPlatformAppByName() if an exception is thrown by the Java method call. The issue is that if an exception is thrown then the return value from CallStaticObjectMethod() is NULL... except on KitKat, where it appears to return garbage instead. This garbage value was being returned and the caller was incorrectly treating it as a valid object reference. The fix is to check if an exception was thrown and explicitly returning NULL in that case, instead of relying on the return value from CallStaticObjectMethod() being NULL.
This bug surfaced in the integration test FirestoreIntegrationTest.CanPageThroughItems which was crashing on KitKat. The root cause was that it was using a custom app name and the call to GetPlatformAppByName() was returning garbage in that case.
firebase-cpp-sdk/app/src/app_android.cc
Lines 302 to 317 in 4a34edd
firebase-cpp-sdk/firestore/integration_test_internal/src/cursor_test.cc
Lines 19 to 26 in 4a34edd