Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add missing return when delete token handler is nil #5247

Merged
merged 2 commits into from Apr 1, 2020

Conversation

charlotteliang
Copy link
Contributor

This fixes crash if passing a nil handler

@@ -367,6 +367,7 @@ - (void)deleteTokenWithAuthorizedEntity:(NSString *)authorizedEntity
if (!handler) {
FIRInstanceIDLoggerError(kFIRInstanceIDMessageCodeInstanceID001,
kFIRInstanceIDInvalidNilHandlerError);
return;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still want to delete the token if there's no completion handler, or leave it as is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the API interface says it is nonnull here so it is supposed to return if passing anil.

@charlotteliang charlotteliang merged commit 848fe50 into master Apr 1, 2020
@charlotteliang charlotteliang deleted the iid-deletetoken branch April 1, 2020 20:15
ryanwilson added a commit that referenced this pull request Apr 1, 2020
Co-authored-by: Chen Liang <chliang@google.com>
@firebase firebase locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants