Skip to content

Conversation

@Renegade334
Copy link
Member

This relates to...

Aims to provide support for a resolution for #4495.

Rationale

Factors contributing to the specification divergence for fetch/websockets as detailed in the linked issue are:

  • the required buffer source converters are missing;
  • the existing buffer source converters are not used within the codebase;
  • those that do exist are out-of-date with the IDL standard.

Changes

Changes to existing converters:

  • ArrayBuffer used to convert to either ArrayBuffer or ArrayBuffer | SharedArrayBuffer, depending on the presence or absence of the [AllowShared] attribute. Subsequent changes to the standard have separated these out into separate IDL types, and so this converter has been split into two.
  • The ArrayBuffer and SharedArrayBuffer converters correctly handle the presence or absence of the [AllowResizable] attribute.
  • The remaining buffer source converters correctly handle the presence or absence of the [AllowShared] and [AllowResizable] attributes.

New converters:

  • ArrayBufferView
  • BufferSource
  • AllowSharedBufferSource

Breaking Changes and Deprecations

As mentioned, this does not affect the current behaviour of undici web APIs, as they do not use these converters at present.

Status

Copy link
Member

@KhafraDev KhafraDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't fix the issue, but as you mentioned, provides a resolution to fixing it. Thanks!

@KhafraDev KhafraDev merged commit b4019ee into nodejs:main Sep 1, 2025
28 of 30 checks passed
@Renegade334 Renegade334 deleted the webidl-buffer-source-converters branch September 1, 2025 23:19
@github-actions github-actions bot mentioned this pull request Sep 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants