Title: lib: refactor internal webidl converters by panva · Pull Request #62979 · nodejs/node · GitHub
Open Graph Title: lib: refactor internal webidl converters by panva · Pull Request #62979 · nodejs/node
X Title: lib: refactor internal webidl converters by panva · Pull Request #62979 · nodejs/node
Description: Rework lib/internal/webidl.js into a documented shared converter module that follows the Web IDL conversion algorithms more closely. Improvements: Add documented converters and helper factories for primitive values, dictionaries, enums, sequences, interfaces, required arguments, integers, Uint8Array, and BufferSource. Move WebCrypto onto the shared converters, while keeping compatibility wrappers for its existing BufferSource and BigInteger behavior. Use shared converters from Blob, Performance, Web Locks, and structured clone option handling. Add benchmarks for ConvertToInt and WebCrypto Web IDL converter hot paths. Add focused tests for core converters, WebCrypto converters, integer conversion, and buffer source behavior. Fixes: Make the shared BufferSource and Uint8Array converters reject resizable ArrayBuffer and growable SharedArrayBuffer backing stores unless explicitly allowed. WebCrypto preserves its legacy resizable backing-store behavior through compatibility wrappers until a semver-major follow-up can opt in to the stricter behavior. Use Web IDL ToNumber and ToString behavior for BigInt, Symbol, and object primitive conversion. Use exact BigInt modulo for 64-bit ConvertToInt wrapping and document the final Number approximation behavior. Normalize mathematical modulo results to +0 where Web IDL requires it. Process inherited dictionaries in least-derived to most-derived order, sorting members only within each dictionary level. Use IteratorComplete truthiness for sequence conversion. Cover detached buffers, resizable-backed views, growable-backed views, cross-realm buffer sources, mutation-after-call behavior, inherited dictionary member order, and sequence iterator completion behavior. Benchmark(s) #62979 (comment) #62979 (comment)
Open Graph Description: Rework lib/internal/webidl.js into a documented shared converter module that follows the Web IDL conversion algorithms more closely. Improvements: Add documented converters and helper factories fo...
X Description: Rework lib/internal/webidl.js into a documented shared converter module that follows the Web IDL conversion algorithms more closely. Improvements: Add documented converters and helper factories fo...
Opengraph URL: https://github.com/nodejs/node/pull/62979
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d1456b78-3573-02b4-b6e9-eeede8d59f51 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BC56:320964:171515B:1F5360E:6A4C8A8D |
| html-safe-nonce | 6ca6c76a845ab1cb05332f548c72b32b46a258620225d0b7212456533c9fda96 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzU2OjMyMDk2NDoxNzE1MTVCOjFGNTM2MEU6NkE0QzhBOEQiLCJ2aXNpdG9yX2lkIjoiODAzNDIwOTkzNDk5NTEzMTAyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8b7bbf305602a747177ffb1f63d0f1b39c067698baa12c4f4bbdc882cd8169f0 |
| hovercard-subject-tag | pull_request:3586456173 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/nodejs/node/pull/62979/files |
| twitter:image | https://avatars.githubusercontent.com/u/241506?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/241506?s=400&v=4 |
| og:image:alt | Rework lib/internal/webidl.js into a documented shared converter module that follows the Web IDL conversion algorithms more closely. Improvements: Add documented converters and helper factories fo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3d11bb817438277de2a940854450e83a7d32b6aeb5014e9e6b00a6423900251c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7a2dede45637df6b92ddcfe2a557e67d4b5854ae |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width