Repository navigation
test(shell): 修正剪贴板 owner 清理的错误码归属 (#85) - #217
Merged
Merged
Conversation
…s refs #85 DestroyWindow does not reliably set the last error, so a failure record could inherit the previous call code; both cleanup calls now clear it first.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
1 of 5 tasks
3 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
采样命中:
DestroyWindow失败时并不会可靠地设置GetLastError,所以win32_error=5很可能是上一次失败调用(CloseClipboard-cleanup)的残留错误码,把真正的失败点掩盖了。修改
两处清理调用前显式
SetLastError(0):CloseClipboard-cleanup;DestroyWindow-cleanup。这样失败记录里的
win32_error一定来自该步骤本身,而不会继承前一个错误码。边界
Refs #85 #99