Uh oh!
There was an error while loading. Please reload this page.
Dispose args when a WritableStream stub call fails - #243
Merged
Conversation
WritableStreamStubHook.call() disposed its arguments on the unknown-method path but not when the hook was already disposed or the path shape was invalid -- those throws returned an ErrorStubHook with the owned arguments stranded. Move the disposal to the catch so every failure path releases them, matching ReadableStreamStubHook.
🦋 Changeset detectedLatest commit: 3a9b1bc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
commit: |
All imports are valid exports. The change is minimal, correct, and well-covered:
LGTM |
ndisidore
marked this pull request as ready for review
August 12, 2026 22:15
kentonv
approved these changes
Aug 13, 2026
Uh oh!
There was an error while loading. Please reload this page.
Merged
dimitropoulos added a commit
that referenced
this pull request
Aug 21, 2026
0.12.0 added a way to construct an `RpcPromise` from an ordinary `Promise`, so callers can pipeline against a capability you have not obtained yet. That is new public API, not a bug fix, and the docs said nothing about it -- main documented it in the root README, which this branch replaced with a pointer to here, so the merge would otherwise have dropped it on the floor. `concepts/promises.md` gets a section, and it leans on the equivalence the API docs make: wrapping a promise means the same thing as a local-loopback call returning it. That is worth stating plainly, because it derives all the rules that would otherwise have to be listed as a second set to memorise -- the resolution is serialized, targets and functions come back as stubs, ownership transfers, rejections propagate. The ownership one is the sharp edge and is called out: disposing the promise disposes the resolution, so resolve with a `.dup()` if you want to keep a stub. The cheat sheet gets a one-line constructor note, matching the one `RpcStub` already has. Also: a Changelog entry in the sidebar under Reference, pointing at the GitHub releases page. Off-site on purpose -- release notes are generated from changesets on every publish, so a page here would be a copy that goes stale the next time anyone ships. Nimbus recognises the absolute URL and adds `target="_blank" rel="noopener"` itself. Nothing else in the merge needed documenting. #241, #243, #251 and #253 are leak and typing fixes with no API surface to describe; #253's note that `RpcPromise<RpcStub<T>>` should now be written `RpcPromise<T>` applies to no annotation anywhere in these pages.
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 freeto 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.
WritableStreamStubHook.call()disposed its copied arguments on the unknown-method path but not when the hook was already disposed or the path shape was invalid. those throws returned anErrorStubHookwith the owned arguments stranded. This moves the disposal into thecatchso every failure path releases them, matchingReadableStreamStubHook.Found while working on the failure-path disposal fixes in #241, but independent of them so it's split out here.