Skip to content

Conversation

yakovmanshin
Copy link
Contributor

  • FunctionsContextProvider.getContext(options:_:) calls AppCheckInterop.getLimitedUseToken(completion:), an optional protocol method
  • When the method is not implemented, its completion handler doesn’t get called
  • This closure is responsible for leaving the dispatch group, and when it’s not called, the group waits longer than needed
  • This change introduces an explicit check for whether the method is implemented
  • It also adds a test which makes sure the method doesn’t exceed the .1s time limit

* `FunctionsContextProvider.getContext(options:_:)` calls `AppCheckInterop.getLimitedUseToken(completion:)`, an *optional* protocol method
* When the method is not implemented, its completion handler doesn’t get called
* This closure is responsible for leaving the dispatch group, and when it’s not called, the group waits longer than needed
* This change introduces an explicit check for whether the method is implemented
* It also adds a test which makes sure the method doesn’t exceed the .1s time limit
@ncooke3 ncooke3 self-assigned this Oct 14, 2024
Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

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

Thanks, nice find!

@paulb777 paulb777 merged commit 84f28c1 into firebase:main Oct 14, 2024
38 checks passed
@yakovmanshin yakovmanshin deleted the functions-optional-protocol-method branch October 14, 2024 15:16
MojtabaHs pushed a commit to MojtabaHs/firebase-ios-sdk that referenced this pull request Oct 17, 2024
@firebase firebase locked and limited conversation to collaborators Nov 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants