File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 1- # Pending
1+ # Unreleased
2+ * Fix a crash related to FPRSessionDetails. (#8691 )
3+
4+ # Version 8.8.0
25* Create a random number of delay for remote config fetch during app starts.
36* Fix log spamming when Firebase Performance is disabled. (#8423 , #8577 )
47* Fix heap-heap-buffer overflow when decoding strings. (#8628 )
Original file line number Diff line number Diff line change @@ -36,12 +36,13 @@ - (instancetype)initWithSessionId:(NSString *)sessionId options:(FPRSessionOptio
3636- (FPRSessionDetails *)copyWithZone : (NSZone *)zone {
3737 FPRSessionDetails *detailsCopy = [[[self class ] allocWithZone: zone] initWithSessionId: _sessionId
3838 options: _options];
39+ detailsCopy.sessionCreationTime = _sessionCreationTime;
3940 return detailsCopy;
4041}
4142
4243- (NSUInteger )sessionLengthInMinutes {
4344 NSTimeInterval sessionLengthInSeconds = ABS ([self .sessionCreationTime timeIntervalSinceNow ]);
44- return (sessionLengthInSeconds / 60 );
45+ return (NSUInteger )( sessionLengthInSeconds / 60 );
4546}
4647
4748- (BOOL )isEqual : (FPRSessionDetails *)detailsObject {
Original file line number Diff line number Diff line change @@ -29,6 +29,17 @@ - (void)testInstanceCreation {
2929 XCTAssertNotNil (details);
3030}
3131
32+ /* * Validates object copy contains same details as the source. */
33+ - (void )testInstanceCopy {
34+ FPRSessionDetails *details = [[FPRSessionDetails alloc ] initWithSessionId: @" random"
35+ options: FPRSessionOptionsNone];
36+ FPRSessionDetails *detailsCopy = [details copy ];
37+ XCTAssertEqual (details.sessionId , detailsCopy.sessionId );
38+ XCTAssertEqual (details.options , detailsCopy.options );
39+ XCTAssertEqual (details.sessionLengthInMinutes , detailsCopy.sessionLengthInMinutes );
40+ XCTAssertNotNil (details);
41+ }
42+
3243/* * Validated that the details are valid. */
3344- (void )testDetailsData {
3445 FPRSessionDetails *details = [[FPRSessionDetails alloc ] initWithSessionId: @" random"
You can’t perform that action at this time.
0 commit comments