Commit 97ceee7
committed
review-comment: Synchronize when serializing SentryNetworkDetails for breadcrumb
#7588 (comment)
Prevent SentryNetworkDetailsData#serialize from reading properties that may be
mutated concurrently by SentryNetworkDetailsData#setResponse
setState
- calls serialize when newState == .completed
completionHandler
- calls setResponse when invoked.
in testing, the completionHandler is invoked after setState(.completed)
returns. However based on research this is not guaranteed so lock so ensure
no concurrent modification of SentryNetworkDetailsData1 parent e493996 commit 97ceee7
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
481 | 481 | | |
482 | 482 | | |
483 | 483 | | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
490 | 492 | | |
491 | 493 | | |
492 | 494 | | |
| |||
0 commit comments