Skip to content

Commit 54b137d

Browse files
fix leakage in NSInvocation (#6098)
1 parent 2a6dee0 commit 54b137d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FirebaseMessaging/Tests/UnitTests/FIRMessagingTest.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ - (void)testAPNSTokenIncludedInOptionsIfAvailableDuringTokenFetch {
233233
[self expectationWithDescription:@"Included APNS Token data in options dict."];
234234
// Inspect the 'options' dictionary to tell whether our expectation was fulfilled
235235
[[[self.mockInstanceID stub] andDo:^(NSInvocation *invocation) {
236-
NSDictionary *options;
236+
__unsafe_unretained NSDictionary *options;
237237
[invocation getArgument:&options atIndex:4];
238238
if (options[@"apns_token"] != nil) {
239239
[expectation fulfill];
@@ -252,7 +252,7 @@ - (void)testAPNSTokenNotIncludedIfUnavailableDuringTokenFetch {
252252
[self expectationWithDescription:@"Included APNS Token data not included in options dict."];
253253
// Inspect the 'options' dictionary to tell whether our expectation was fulfilled
254254
[[[self.mockInstanceID stub] andDo:^(NSInvocation *invocation) {
255-
NSDictionary *options;
255+
__unsafe_unretained NSDictionary *options;
256256
[invocation getArgument:&options atIndex:4];
257257
if (options[@"apns_token"] == nil) {
258258
[expectation fulfill];

0 commit comments

Comments
 (0)