Fix duplicate completion registration in generated progress promises - #206
Open
leileizhang (lei9444) wants to merge 3 commits into
Open
leileizhang (lei9444) wants to merge 3 commits into
leileizhang (lei9444) wants to merge 3 commits into
Conversation
Return the existing projected Promise instead of registering native completion again. Cover generated operations, actions, overloads, cancellation, and stock Windows stream/localhost HTTP consumers. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Accept optional trailing commas and format the two existing macro calls required by hosted Rust 1.99. Generated native signatures and behavior are unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Mixed-language test coverageWorkflow status: ✅ Passed
|
Cover the stock HttpClient overload, bigint-progress content read, and buffer result through repeated projected Promise consumers. This executes 196 additional lines of the existing generated fixture set without lowering or excluding the coverage gate. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.
Problem
Generated JavaScript async-with-progress values already start and project a native Promise. Calling their public
.toPromise()registered completion again, so a stockInMemoryRandomAccessStream.writeAsync(buffer).toPromise()rejected with0x80000018(E_ILLEGAL_DELEGATE_ASSIGNMENT) instead of returning the awaited result.Fix
Return the existing projected Promise from
.toPromise(), including the existing rejection for pre-aborted signals. The shared emitter covers operations, actions, and overloads. Clarify this identity guarantee without changing signatures, rawDynWinRtValue.toPromise(), Python, native ABI, or runtime dispatch.Hosted Rust 1.99 exposed pre-existing formatting drift in two test-hook stub macro calls. Accept optional trailing commas and format those calls so the normal CI lane can run; emitted native signatures and behavior are unchanged.
Verification
de91e9b3) output fails the new 4 MiB stock stream regression with0x80000018on ARM64 and x64. Fresh repaired output passes on both using locally built, matching production runtimes (no preview binaries/test hooks).undefinedresults, overload dispatch, repeated/detached.toPromise(),await/.then()/Promise.all, projected progress, cancellation, rejection identity, listener cleanup, and pre-aborted signals with zero native calls. Strict TypeScript consumer regression passes.Independent PR based directly on main; no unmerged #198/#205 or audit-branch changes.