-
Notifications
You must be signed in to change notification settings - Fork 549
[CoreFoundation] Improve the handling of data callbacks in CFSocket.OnCallback. #23955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CoreFoundation] Improve the handling of data callbacks in CFSocket.OnCallback. #23955
Conversation
…nCallback. Augment CFSocketDataEventArgs to take and store a CFData, and if instantiated this way, then compute the byte array for the Data property from the CFData instance on demand instead of when instantiating the CFSocketDataEventArgs. This way any problems when creating the byte array can be handled in user code, instead of crashing the process because it occurs in a callback on a background thread where the app developer can't handle the exception. Fixes #18551.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #af2c078] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #af2c078] Build passed (Detect API changes) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #af2c078] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
💻 [CI Build #af2c078] Tests on macOS X64 - Mac Sonoma (14) passed 💻✅ All tests on macOS X64 - Mac Sonoma (14) passed. Pipeline on Agent |
💻 [CI Build #af2c078] Tests on macOS M1 - Mac Monterey (12) passed 💻✅ All tests on macOS M1 - Mac Monterey (12) passed. Pipeline on Agent |
💻 [CI Build #af2c078] Tests on macOS M1 - Mac Ventura (13) passed 💻✅ All tests on macOS M1 - Mac Ventura (13) passed. Pipeline on Agent |
💻 [CI Build #af2c078] Tests on macOS arm64 - Mac Tahoe (26) passed 💻✅ All tests on macOS arm64 - Mac Tahoe (26) passed. Pipeline on Agent |
💻 [CI Build #af2c078] Tests on macOS arm64 - Mac Sequoia (15) passed 💻✅ All tests on macOS arm64 - Mac Sequoia (15) passed. Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #af2c078] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 117 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
Augment CFSocketDataEventArgs to take and store a CFData, and if instantiated
this way, then compute the byte array for the Data property from the CFData
instance on demand instead of when instantiating the CFSocketDataEventArgs.
This way any problems when creating the byte array can be handled in user
code, instead of crashing the process because it occurs in a callback on a
background thread where the app developer can't handle the exception.
Fixes #18551.