Skip to content

Conversation

@itaybre
Copy link
Contributor

@itaybre itaybre commented Nov 25, 2025

Under some scenarios, calling addBreadcrumb in the background, may en up in SentryCrashWrapper using UIWindows in the background thread.
Since all we need is the window's size, this is enough.

Closes: #5424

@linear
Copy link

linear bot commented Nov 25, 2025

@codecov
Copy link

codecov bot commented Nov 25, 2025

Codecov Report

❌ Patch coverage is 68.75000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.931%. Comparing base (5bc23b4) to head (6929b4d).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ces/Swift/Helper/SentryApplicationExtensions.swift 72.727% 3 Missing ⚠️
Sources/Swift/SentryCrash/SentryCrashWrapper.swift 50.000% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #6905       +/-   ##
=============================================
+ Coverage   84.928%   84.931%   +0.002%     
=============================================
  Files          453       453               
  Lines        27609     27621       +12     
  Branches     12123     12127        +4     
=============================================
+ Hits         23448     23459       +11     
+ Misses        4116      4114        -2     
- Partials        45        48        +3     
Files with missing lines Coverage Δ
...rces/Sentry/SentryDependencyContainerSwiftHelper.m 68.421% <100.000%> (+1.754%) ⬆️
Sources/Swift/SentryCrash/SentryCrashWrapper.swift 94.405% <50.000%> (-1.399%) ⬇️
...ces/Swift/Helper/SentryApplicationExtensions.swift 22.935% <72.727%> (+5.588%) ⬆️

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5bc23b4...6929b4d. Read the comment docs.

@itaybre itaybre added the ready-to-merge Use this label to trigger all PR workflows label Nov 25, 2025
@itaybre itaybre marked this pull request as ready for review November 25, 2025 20:58
@github-actions
Copy link
Contributor

github-actions bot commented Nov 25, 2025

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1230.11 ms 1262.27 ms 32.16 ms
Size 24.14 KiB 1.01 MiB 1013.66 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
48e5c8a 1223.02 ms 1242.38 ms 19.35 ms
8fd192f 1202.10 ms 1220.19 ms 18.09 ms
5200f5b 1231.73 ms 1254.35 ms 22.62 ms
f8cad3c 1217.94 ms 1257.96 ms 40.02 ms
abe8da4 1232.98 ms 1259.12 ms 26.14 ms
4be5cd8 1222.35 ms 1251.43 ms 29.07 ms
af7a86c 1220.82 ms 1243.36 ms 22.54 ms
52f3b6e 1219.57 ms 1239.70 ms 20.13 ms
ebc72be 1221.24 ms 1249.66 ms 28.42 ms
1339919 1214.82 ms 1238.98 ms 24.16 ms

App size

Revision Plain With Sentry Diff
48e5c8a 23.75 KiB 913.63 KiB 889.88 KiB
8fd192f 23.74 KiB 872.75 KiB 849.01 KiB
5200f5b 23.75 KiB 933.33 KiB 909.58 KiB
f8cad3c 23.75 KiB 1.01 MiB 1016.13 KiB
abe8da4 23.75 KiB 987.95 KiB 964.21 KiB
4be5cd8 23.75 KiB 980.80 KiB 957.06 KiB
af7a86c 23.74 KiB 926.65 KiB 902.90 KiB
52f3b6e 23.75 KiB 920.54 KiB 896.79 KiB
ebc72be 23.75 KiB 908.22 KiB 884.47 KiB
1339919 23.75 KiB 919.70 KiB 895.95 KiB

Previous results on branch: itay/cocoa-422-dispatch-access-of-uiwindow-screen-to-main-thread-in

Startup times

Revision Plain With Sentry Diff
3deba3b 1210.61 ms 1245.51 ms 34.90 ms

App size

Revision Plain With Sentry Diff
3deba3b 24.14 KiB 1.01 MiB 1013.52 KiB

@itaybre itaybre enabled auto-merge (squash) November 27, 2025 17:18
@itaybre itaybre merged commit 3540969 into main Nov 27, 2025
205 of 210 checks passed
@itaybre itaybre deleted the itay/cocoa-422-dispatch-access-of-uiwindow-screen-to-main-thread-in branch November 27, 2025 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dispatch access of UIWindow screen to main thread in SentryCrashWrapper

4 participants