Fix asynchronous WUA methods (BeginSearch, BeginDownload, BeginInstall) - #15
Fix asynchronous WUA methods (BeginSearch, BeginDownload, BeginInstall)#15wisper-sabrina wants to merge 2 commits into
Conversation
…l) require a non-NULL IUnknown* callback argument. Passing NULL (VT_NULL) makes them fail with DISP_E_TYPEMISMATCH (0x80020005), so I fixed the functions
There was a problem hiding this comment.
Code Review
This pull request introduces a dummy callback mechanism (newNoopDispatch) in a new file olecallback.go to prevent Windows Update Agent (WUA) asynchronous methods from failing due to null callback arguments. The review feedback highlights critical issues in this implementation, including a data race on the reference counter (ref) that requires atomic operations, and an unbounded memory leak caused by appending callbacks to a global slice that never gets cleared. The reviewer suggests using a thread-safe global singleton instance instead to resolve both the leak and synchronization issues.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #15 +/- ##
==========================================
+ Coverage 43.89% 45.55% +1.66%
==========================================
Files 34 35 +1
Lines 1392 1440 +48
==========================================
+ Hits 611 656 +45
+ Misses 562 561 -1
- Partials 219 223 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
The asynchronous WUA methods (BeginSearch, BeginDownload, BeginInstall) require a non-NULL IUnknown* callback argument. Passing NULL (VT_NULL) makes them fail with DISP_E_TYPEMISMATCH (0x80020005), so I fixed the functions