Commit Graph
40 Commits
Author SHA1 Message Date
ldm0 bc8a4a12b1 fix(v8): propagate rejected native object mutations
Require affirmative V8 mutation results in fallible object builders,
prototype binding, cached getters and IndexedDB state. Preserve failure
results during encoded-frame serialization and clean up unpublished Blob
references and transferred ports when initialization fails.

Cover nonthrowing V8 property rejection and require successful fixture
setup in native binding tests. Follow up #2479.
2026-11-08 02:09:30 +08:00
ldm0 cc44a81242 test(webidl): cover BufferSource partial write bounds 2026-11-01 15:43:35 +08:00
ldm0 4883dab2e0 test(webidl): cover ordered derived dictionary sequences 2026-11-01 15:41:50 +08:00
ldm0 e855f86dbb test(webidl): cover clamped unsigned long derived conversions 2026-11-01 15:40:59 +08:00
ldm0 e91776e191 test(webidl): cover native TextEncoder destination view policies
Original-commit: 67f583f9e9427b39a060988af292f4c78974fcf3
2026-11-01 02:29:49 +08:00
ldm0 9939abc2c6 feat(webidl): add Clamp unsigned long conversion 2026-10-30 04:26:11 +08:00
ldm0 5ce8b8fd87 fix(webidl): enforce native Uint8Array buffer policies
Keep Uint8Array identity while validating the native buffer: reject author proxies and resizable/growable storage, distinguish detached fixed buffers from detached resizable buffers, and reject shared storage unless the declaration explicitly permits it. Add derive-level allow_shared support and mark TextEncoder.encodeInto’s destination according to Encoding IDL. Depends on the shared native buffer introspection foundation; conversion tests cover direct locals, optional/sequence fields, shared policy and getter exceptions.
2026-10-30 04:14:12 +08:00
ldm0 e41e51102e feat(webidl): add clamped long long conversion and derive support 2026-10-19 14:27:07 +08:00
ldm0 b165771974 refactor(webidl): derive dictionary output and backing state 2026-10-19 10:54:54 +08:00
ldm0 fa960b2fc1 refactor(webidl): derive dictionary snapshots for RTC configuration 2026-10-19 05:26:21 +08:00
ldm0 80618fce6c fix(encoding): snapshot decoder input after options conversion 2026-10-18 20:03:00 +08:00
ldm0 38d1425b89 feat(webidl): add a fixed non-shared BufferSource converter 2026-10-15 17:35:20 +08:00
ldm0 06866c9474 feat(webidl): derive EnforceRange unsigned short conversion 2026-10-12 14:57:52 +08:00
ldm0 dcf8cb94ee feat(webidl): support lossless DOMString16 in derive bindings 2026-10-12 14:45:32 +08:00
ldm0 46eb3fe889 feat(webidl): derive octet arguments with modulo-256 conversion
Add the shared WebIDL octet converter and derive support for explicit octet and inferred u8 fields. Convert through JavaScript numeric coercion and modulo arithmetic. Regressions cover negative/fractional/large values, nonfinite numbers, thrown conversion identity, argument sequence order, dictionaries, and unsupported primitives. MIDI bindings are separate.
2026-10-12 03:51:53 +08:00
ldm0 53111bf02f feat(webidl): write BufferSource rows without changing padding
Extracted from wpt-misc-fix.

Source-commit: 4fb35a340e
2026-10-12 02:14:09 +08:00
ldm0 e0301f124e feat(webidl): derive sequences of dictionary values
Extracted from wpt-misc-fix.

Source-commit: 4fb35a340e
2026-10-12 01:11:02 +08:00
ldm0 8ca9986eec feat(webidl): derive wrapping signed long long conversion
Extracted from wpt-misc-fix.

Source-commit: 4fb35a340e
2026-10-12 01:03:50 +08:00
ldm0 4b8dc0f320 feat(webidl): retain native BufferSource identity through conversion
Add borrowed AllowShared BufferSource conversion for algorithms that copy after dictionaries are converted, including native range writes and atomic shared-memory byte access. Reject resizable/growable storage and author proxies using native identity, including detached resizable buffers and views. Tests cover late snapshots, bounded writes, surrounding bytes, detachment and native resizable flags. Individual API migrations are separate.
2026-10-11 09:16:23 +08:00
ldm0 2d38fd438d feat(webidl): support EnforceRange signed long long 2026-10-10 18:34:31 +08:00
ldm0 4c13737bc8 feat(webidl): add unrestricted binary32 float conversion
Add an explicit unrestricted_float converter to the shared WebIDL value and derive infrastructure. Preserve signed zero, NaN and infinities while rounding finite numbers to binary32; required arity, conversion side effects and original exceptions retain the existing contracts. Cross-realm tests compare Math.fround and check callee-realm TypeError.
2026-10-10 18:23:49 +08:00
ldm0 a423ba43b1 feat(webidl): derive dictionary member order and inheritance
Derive dictionary member conversion in lexical order and add explicit #[webidl(inherit)] support that converts ancestor dictionaries before derived members. Migrate the existing native EventInit-based dictionaries together so sorting does not mix inherited and own members. Reject incompatible inheritance attributes and duplicate own member names. V8 integration tests cover aliases, nested and inherited dictionaries, Proxy/getter traces, early exceptions and coercion ordering. Native renderer regressions cover twelve event constructors in two realms, flag preservation, and ancestor getter exceptions preventing all derived reads.
2026-10-10 13:43:23 +08:00
ldm0 5c56c0acfd feat(webidl): derive iterable sequences with element metadata
Add sequence fields for Vec and optional Vec, with inferred or explicit item converters and interface/brand_check metadata. Reuse the runtime iterator and preserve interleaved conversion, exception identity, nullability and object identity across realms.

Validation on the combined tree: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19639 passed, 16 skipped; CARGO_BUILD_JOBS=1).
2026-10-06 13:35:34 +08:00
ldm0 d131974596 feat(webidl): derive dictionary arguments and nested members
Add dictionary fields backed by WebIdlDictionary, including empty, optional and nullable conversions without requiring Rust Default. Preserve required-member checks, getter order, scope-dependent defaults and original exceptions.

Allow non-defaulted interface arguments to convert in field order without adding an arity gate, so existing XPath conversion timing can be preserved.

Validation on the combined tree: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (19639 passed, 16 skipped; CARGO_BUILD_JOBS=1).
2026-10-06 13:35:34 +08:00
ldm0 761b39bc84 feat(webidl): derive native interface brand checks
Add interface and brand_check field attributes to argument and dictionary derives, including variadic object arguments. Preserve native object identity and validate brands at each field conversion position.

Cover nullability, conversion order, cross-realm errors, registered native proxies, and invalid attribute combinations.
2026-10-06 13:35:34 +08:00
ldm0 815ab6bbcd feat(webidl): support signed short argument conversion 2026-10-05 05:24:54 +08:00
ldm0 b8e7b6b27b refactor(webidl): share DOMString conversion through UTF-16 2026-10-04 02:36:29 +08:00
ldm0 28ecf45c9b fix(webidl): preserve low bits in unsigned 64-bit wrapping 2026-10-04 02:30:29 +08:00
ldm0 e6e9a3309c feat(webidl): add lossless DOMString conversion
Add an explicit UTF-16 DOMString converter for bindings that must preserve lone surrogates. Reuse the existing UTF-16 extraction helper and keep this change additive, without rerouting the existing DOMString converter.

Regressions cover code-unit preservation, scalar conversion, null-to-empty options, single string-hint coercion, exception identity and callee-realm TypeErrors. Existing DOMString and USVString behavior is also checked.
2026-10-01 16:54:03 +08:00
ldm0 e03f6a71c5 feat(webidl): support restricted float conversion
Add the WebIDL restricted float converter and f32 inference in generated argument and dictionary bindings. Round finite numbers to binary32, reject values that become nonfinite, and preserve exceptions from numeric conversion.

Regression coverage compares rounding with V8 Math.fround, including signed zero, subnormals and overflow, and checks implicit/explicit derived argument conversion, single coercion, exception identity and the callee TypeError realm. Extracted from the AudioBuffer commit without an audio runtime dependency.
2026-10-01 16:53:47 +08:00
ldm0 0e553d5a5f fix(webidl): check required arity before argument conversion 2026-09-30 10:21:52 +08:00
ldm0 826c8e3957 feat(events): implement animation transition and blob payloads
Implement AnimationEvent, TransitionEvent, and BlobEvent constructors and their read-only payload attributes using native Event state and shared Web IDL receiver validation. Preserve dictionary conversion order, DOMString UTF-16 code units, finite-double validation, and the required native Blob member.

Regression coverage checks descriptors, payload values, dispatch, subclassing, cross-realm constructors/getters, invalid receivers, and conversion exceptions.

Validation: fmt, strict workspace clippy, full nextest. Summary [ 144.022s] 18905 tests run: 18905 passed (9 slow, 4 flaky), 16 skipped
2026-09-29 07:26:29 +08:00
ldm0 f591863281 fix(webidl): unify EventListener argument conversion 2026-09-24 15:24:35 +08:00
Donough Liu 04ac476e66 fix(events): share AbortSignal EventTarget dispatch (#769) 2026-09-23 04:44:38 +08:00
ldm0 59ed855b9d fix(webidl): enforce integer ranges after truncation
Apply integer truncation before range validation and constrain 64-bit EnforceRange to JavaScript exact integers. Cover negative fractions, finite endpoints, non-finite values, and OPFS offset range rejection.

Source: 1a1ca5af42
2026-09-17 00:39:47 +08:00
ldm0 0c037567ce fix(webidl): preserve record conversion order 2026-09-16 17:08:44 +08:00
ldm0 b0780fbe0e fix(webidl): retain enumerable symbol record keys 2026-09-16 17:08:44 +08:00
ldm0 18bab6d67b fix(webidl): complete sequence conversion before validating pairs
Propagate WebIDL sequence conversion errors without IteratorClose. Convert all inner sequences before validating URLSearchParams pair lengths or normalizing Headers, preserving getter order and conversion exceptions.

Source: afe693c9a3, 4a420981c3
2026-09-16 17:02:20 +08:00
ldm0 017c53de8c build(v8): migrate Moli to V8 15.2 2026-09-03 15:17:48 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00