Skip to content

Commit a8d3bbb

Browse files
committed
review-feedback: Document usage of objc_getAssociatedState key
#7588 (comment)
1 parent 2ea5b3b commit a8d3bbb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/Sentry/SentryNetworkTracker.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,9 @@ - (SentryLevel)getBreadcrumbLevel:(NSURLSessionTask *)sessionTask
573573
}
574574

575575
#if SENTRY_TARGET_REPLAY_SUPPORTED
576-
// Store extracted network details data for session replay.
576+
// Associated object key for attaching SentryReplayNetworkDetails to each NSURLSessionTask.
577+
// Safe: setAssociatedObject follows existing patterns in urlSessionTask:setState:
578+
// and getAssociatedObject is called from blocks that hold a strong reference to the task.
577579
static const void *SentryNetworkDetailsKey = &SentryNetworkDetailsKey;
578580

579581
- (BOOL)isNetworkDetailCaptureEnabledFor:(NSString *)urlString options:(SentryOptions *)options

0 commit comments

Comments
 (0)