Handle empty CSP input in a small inline entry and delegate nonempty
batches to a separate function. The mutation finisher only checks
whether the DOM changed before invoking CSP followups.
Skip processing empty stylesheet owner changes at the mutation finisher.
Continue applying pending stylesheet CSS projections and slotchange events.
A/B against the previous caller-side CSP guard on the resulting branch
(fixed local WeChat HTML; release; JS/CSS/subframes disabled; 200 balanced
randomized pairs) measured 142.39 -> 141.29 ms.
Paired saving: 0.34 ms; 95% bootstrap CI:
[-0.87, 1.57] ms. The confidence interval includes zero; no resolved performance gain.
All 400 measured Markdown outputs were identical.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Resolve the document base URL only after a mutation produces meta-refresh candidates. Ordinary text mutations avoid repeating the URL query and clone.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Collect unique owner documents in a SmallVec with inline capacity one.
The common parser mutation avoids heap allocation, and batches retain
each document's first-occurrence notification order.
Follow-up A/B against the previous Option + Vec implementation on the
resulting branch (fixed local WeChat HTML; release; JS/CSS/subframes
disabled; 200 balanced randomized pairs) measured 141.49 -> 142.85 ms.
The paired increase was 1.22 ms, with a 95% bootstrap CI of
[-0.14, 3.11] ms: no measured speedup from this refactor.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Handle an ordinary single-node mutation inside the grouping function,
returning a SmallVec group that borrows the original effect slice. Keep
the entry small and inline, and use a batch helper for owned groups and
subtree splitting across documents. Iterate groups by reference.
The invalidation caller consumes one uniform grouping result; a single
node mutation avoids cloning effects and allocating grouping containers.
Record the isolated borrowing A/B conditions, timings, and confidence
intervals beside the single-effect fast path.
Validation of the resulting branch:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Return SmallVec<[StyleMutationEffect; 1]> from from_dom_mutation_effects.
Handle a pure single character-data update inside the converter before
constructing the deduplication set. Keep the notification call uniform;
batches preserve their existing order and deduplication.
Cover repeated text updates, :empty styles, and MutationObserver old values
in live and windowless documents.
Validation of the resulting branch:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Performance vs parent b75de5c66f (fixed local WeChat HTML, release,
JS/CSS/subframes disabled, 100 balanced randomized pairs):
Wall median 180.575 -> 165.316 ms (-8.45%). Paired median saving
13.885 ms; bootstrap 95% CI [12.364, 19.486] ms. The code tree matches
the previously validated and measured SmallVec version 84c5a81cca.
An uncaught exception in a main-world document-start script failed the
document commit. Page.navigate had already been answered, so the client
never received a load event.
Report the exception like a classic script exception and run the
remaining scripts. Internal errors still fail the commit.
Fixes#1084.
Pending Response body materializations and stored JavaScript rejection
reasons held strong V8 handles in the native context host. Navigation could
cancel the body fetch while leaving a resolver rooted, retaining the old
Context and its native Document through the shared isolate.
Move these handles into the owning realm's traced graph at teardown. Keep
buffered bytes and error identity available to externally retained Responses,
including pending body methods completed after the realm retires.
Add native host lifetime regressions for pending bodies and stored errors,
and verify retained body readers remain usable until their last V8 reference.
Validation: cargo fmt --all; strict workspace/all-target/all-feature Clippy;
cargo nextest run --no-fail-fast (19,650 passed, 16 skipped); release build.
CI-equivalent fixture contract is clean. At 144 real-site navigations,
post-blank GC leaves 1.76 MiB JS heap and two actual NativeContexts;
benchmark RSS ends at 177 MiB versus 706 MiB before the fixes.
The owner thread can finish reservation and prepare during the first poll,
making the cancellation test's initial Pending assertion timing dependent.
Gate reservation dispatch before polling, then release it before the existing
barrier and prepare gate. This reliably exercises cancellation of an in-flight
prepare while retaining the scope-release and isolate-reservation assertions.
Validation: cargo fmt --all; strict workspace/all-target/all-feature Clippy;
cargo nextest run --no-fail-fast (19,650 passed, 16 skipped); release build.
The exact cancellation test also passed 25 concurrent stress executions.
Document teardown used the document.open reset, which preserves compiled
module records and pending dynamic imports. Their strong V8 handles rooted
retired Contexts and native Documents across shared-isolate navigations.
Release module records, pending imports, graph fetches and owner events on
context teardown. Preserve import-map metadata so externally retained module
functions can still access native DOM values and import.meta.resolve aliases.
Leave document.open module-map semantics unchanged.
Add regressions for compiled modules, pending dynamic imports, and exported
functions retained across teardown. All three collection regressions fail
before the fix; retained functions remain usable until their last V8 reference
is released.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(19,646 passed, 16 skipped). The initial run hit a 250ms CLI timeout
stage assertion; a full run with unchanged sources passed.
Release build with default Cargo parallelism. The CI real-site spider's
48-site peak RSS drops from 485.5 to 281.1 MiB, and last alive RSS drops
from 398.9 to 171.6 MiB. No forced GC was added to production navigation.
Include prebootstrapped child contexts in document teardown and clear
superseded prebootstrap contexts before retiring their execution bindings.
These contexts can be exposed through contentWindow before promotion and
otherwise keep their native Document alive through intrinsic Global handles.
Cover collection after teardown and native DOM access while JavaScript still
retains the child realm. The collection regression fails without the fix.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(19,643 passed, 16 skipped); release spider benchmark and heap snapshots.
Position transparent opening and closing edges around their visual descendants
after bidi reordering and before alignment. Keep the logical edge widths used
by line breaking while honoring CSS direction for physical padding and borders.
Move the inline-object bidi patch onto current upstream Parley main and pin
the fork at 8eb00ef5e628b1bba95dcde88658deb2a5aed1b5. Adapt the new font,
metrics, whitespace and layout APIs while preserving neutral atomic analysis.
Preserve the browser's synthetic-bold policy through Fontique's host threshold.
Use structural style ancestry for inline text masks so physical edge ordering
cannot change which glyphs belong to a background-clip:text target.
Add 96 Chromium-verified decoration cases covering natural RTL and mixed text,
CSS directions, asymmetric padding and borders, and layout publication. Add a
Chromium-verified paint test for ordinary and nested LTR/RTL text masks.
Resolve inline objects independently so an atomic sibling outside a closed
RTL context follows the surrounding text instead of the preceding RTL run.
Pin the Parley 0.11.1 fork repair and its shared Fontique source.
Declare atomic and transparent boundary roles at the Moli adapter, keeping
opening edges with the next participant and closing edges with the previous
item. Add 336 Chromium-verified geometry cases across document modes,
contexts, directions, breaks and atomic placement, including publication.
Replace PointerEventReference and the sequence member helper with a derived dictionary at the original conversion position. Retain the event-backing predicate and original object identity, and cover cross-realm inputs and failure stopping before later getters.
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).
Replace ClipboardItemReference and collection/options adapters with interface sequences, dictionary fields and a raw record field. Retain record projection, storage snapshots and Promise rejection behavior. Cover iterator failure identity and conversion stopping without modifying clipboard data.
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).
Replace SignalReference and its argument adapter with a required interface sequence field. Preserve iterable conversion before AbortSignal state processing and use the common interface TypeError context.
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).
Derive ResponseInit directly on ParsedResponseInit and use it for the Response.json argument. Remove the duplicate representation and adapter while retaining header conversion, status defaults and response construction order.
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).
Replace three dictionary argument adapters with dictionary field declarations. Preserve keyPath union conversion, member order and the subsequent IndexedDB option validation.
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).
Derive strategy and codec/iterator options while retaining highWaterMark presence and operation-specific defaults in the stream algorithm. Convert and validate TransformStream writable strategy before its readable strategy, then read transformer members. Derive QueuingStrategyInit with required unrestricted highWaterMark and cover conversion/error order 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).
Remove options-to-dictionary adapter hooks for TextDecoder, custom elements, QuotaExceededError, Worklet, Geolocation and ProgressEvent. Use dictionary member defaults, including the Geolocation timeout, and normalize conversion error contexts to the declaring API.
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).
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).
Replace nine custom field parsers with existing interface, raw and USVString conversion declarations. Retain required members, original objects and optional/null semantics; use the common WebIDL TypeError format.
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).
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).
Validate HTMLFormElement and nullable HTMLElement arguments in the derived parser. Keep submit button and form ownership checks in the constructor and cover ignored valid submitters when the form is omitted.
Replace WindowReference and EventTargetReference with interface field attributes. Retain the Window-specific native receiver predicate and nullable argument conversion order.
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.
Stamp every successful Page VM state capture with its VM creation identity
and capture sequence, including nested captures. Reject older revisions at
the shared Page cache installation point while preserving each query reply.
A real same-document regression holds two DOM snapshots and consumes them in
reverse order. Both return their captured titles, while the cached title
must remain the newer value.
Native CDP replies can expose resources before the protocol adapter consumes
its Page snapshot. Resolve, decode, and search sources in one renderer command
instead of refreshing a snapshot and selecting cached content in the adapter.
Pass the immutable main response body by committed loader and preserve frame
matching, decoding, byte limits, and the attachment check before settlement.
Require a single renderer turn in the held-native-publication regression.
Native Page replies can reach the frontend before the adapter updates the cached resource report. Capture a current renderer snapshot before selecting root frame subresources and reject completions from replaced renderer attachments.
Add regressions for resource searches before native adapter settlement and for navigation before consuming a resource snapshot.