Commit Graph
4109 Commits
Author SHA1 Message Date
ldm0 c900668cd0 fix(fetch): reuse eligible same-origin memory cache responses
Apply force-cache and only-if-cached stale reuse after representation and
Vary selection. Give cors and same-origin requests the same raw response
identity only for untainted same-origin URLs, retaining origin, credential,
partition, cookie and redirect-handling boundaries. Current consumers still
validate every cached redirect and response before exposing it.

Add four I/O regression tests for stale reuse, Vary and authority isolation,
cached same-origin redirects and denial of cached cross-origin redirects.
Validation: workspace fmt, all-target/all-feature clippy, and full nextest
(25,043 passed; 19 skipped).
2026-11-03 18:08:21 +08:00
ldm0 dda4c52234 fix(fetch): honor request HTTP cache modes
Preserve all six cache policies through Window and worker Fetch using a
shared derived enum. Emit cache request controls without replacing author
fields, bypass storage for default conditional requests, and reuse eligible
stale entries for force-cache and only-if-cached. Cache-only misses produce
a typed network error before connecting while retaining Vary, partition,
cancellation and redirect security checks.

Exercise wire headers, stale reuse, conditional requests, cache replacement,
cache-only misses, privacy boundaries and cached redirects with seven native
I/O regression tests. Validated with workspace fmt, all-target/all-feature
clippy and the complete nextest suite (25,039 passed; 19 skipped).
2026-11-03 18:08:21 +08:00
ldm0 b8ab4dce01 test(worker): await nested keepalive detachment before inspection
Joining a parent Worker intentionally does not synchronously join its nested
Workers. Wait for the child to publish its pending detached keepalive before
asserting its exact count, while withholding the server response. Keep the
existing timeout and the zero-after-completion assertion.

Validation: workspace fmt, all-target/all-feature clippy and full nextest.
2026-11-03 18:08:21 +08:00
ldm0 b909029f57 fix(canvas): preserve binding order after main rebase
Keep path bindings ahead of rectangle bindings while retaining main's
derived clearRect receiver and numeric conversions. Preserve the existing
prototype property installation order.
2026-11-03 18:08:21 +08:00
ldm0 c1e24dd988 fix(fetch): normalize body Blob types without MIME serialization
Keep the combined Content-Type spelling while applying Blob ASCII type
normalization, matching Chromium. Preserve case-sensitive MIME parsing for
formData and cover native headers, pending streams, and body bytes.
2026-11-03 18:08:21 +08:00
ldm0 0c3b96dd28 fix(fetch): enforce CORP before delivering network responses 2026-11-03 18:08:21 +08:00
ldm0 6be2a01079 fix(workers): enforce creator embedder policy during startup 2026-11-03 18:08:21 +08:00
ldm0 37417b10e1 fix(cache): enforce opaque response policies on cache reads 2026-11-03 18:08:20 +08:00
ldm0 67dbd081d4 fix(reporting): expose native Report snapshots with toJSON 2026-11-03 18:08:20 +08:00
ldm0 98e44ba413 feat(fetch): preserve response credentials state 2026-11-03 18:08:20 +08:00
ldm0 a44dbe36ce perf(dom): avoid empty custom-element registry removal plans 2026-11-03 18:08:20 +08:00
ldm0 ca369d70d9 fix(dom): enforce native Window agent-cluster boundaries 2026-11-03 18:08:20 +08:00
ldm0 099607527e fix(dom): ignore domain relaxation in isolated agent clusters
Use native Window agent-cluster isolation independently of the
permissions-filtered crossOriginIsolated capability. Keep domain
validation and conversion errors, and avoid recording ignored
assignments or refreshing their Window security tokens.
2026-11-03 18:08:20 +08:00
ldm0 4ec9471894 test(xhr): synchronize upload timeout microtasks with real reports 2026-11-03 18:08:20 +08:00
ldm0 7dcf66eb23 fix(storage): reconcile WPT state with SQLite partitions 2026-11-03 18:08:20 +08:00
ldm0 a167bbeb6b fix(fetch): honor Document credentialless network policy 2026-11-03 18:08:20 +08:00
ldm0 67713e4d42 fix(fetch): omit credentialless worker network credentials 2026-11-03 18:08:20 +08:00
ldm0 deacb9a9af fix(runtime): gate SharedArrayBuffer constructors on native isolation
Use V8 per-context constructor policy and conditional installation after binding the native Window or Worker owner. Keep the intrinsic and Wasm shared memory available without exposing the global in nonisolated realms.

Preserve shared BufferSource regression coverage through Wasm-derived constructors and check Window, Worker, iframe, ServiceWorker, SharedWorker, and unbound V8 Context exposure.

Validation: cargo fmt --all; strict workspace/all-target/all-feature clippy; cargo nextest run --no-fail-fast (24,925 passed, 19 skipped; 32 jobs, zero retries).
2026-11-03 18:08:20 +08:00
ldm0 9c5c93be79 fix(runtime): finish native context adaptation after main rebase
Use the native Worker Context binding for Trusted Types after removal of the private carrier. Follow the renamed Window bootstrap and initialize runtime-only Document environments explicitly.

Adapt the transaction GC regression to the store-name lifecycle argument and remove the obsolete whole-matrix timeout helper after main split cursor probes into bounded sections. Format the merged native context exports.
2026-11-03 18:08:20 +08:00
ldm0 98be105306 fix(workers): distinguish service and shared worker isolation
Derive ServiceWorker isolation from its own trustworthy enforced COEP response.
A COEP-only worker can clone shared memory; a DIP-only response cannot grant
this capability.

Keep SharedWorker agents in the default non-isolated mode, including the Blob
creator-policy fallback, while retaining independent COEP/DIP network policies.
Cover actual classic/module registration, HTTP and Blob creation, and cloning.
2026-11-03 18:08:20 +08:00
ldm0 c51cd34214 fix(isolation): honor permissions and inherit iframe capabilities
Apply response and container cross-origin-isolated permissions before allowing
structured-clone shared backing stores, preserving denials across descendants.

Resolve COEP-only child capabilities from the top-level COOP+COEP group while
keeping DIP isolation local and compatible with Chromium. Preserve the policy
in navigation snapshots and worker request contexts.
2026-11-03 18:08:20 +08:00
ldm0 eb786f7237 feat(structured-clone): clone isolated shared memory across agents
Retain native V8 backing stores and validate native isolation and agent-cluster identity before creating receiver wrappers. Carry creator identity through pending, local and nested DedicatedWorker creation while keeping storage and transfer-list rejection. Cover graph aliases, growable buffers, Wasm memory, worker/port forwarding and native authority boundaries against default Chromium.
2026-11-03 18:08:20 +08:00
ldm0 377cc109f4 fix(workers): retire nested workers with their parent global
Keep nested Worker handles in their parent global's native registry so terminate and global retirement release descendants through the existing nonblocking shutdown path. Remove production raw handle ownership from V8 private slots.

Add classic and module worker regressions for ancestor termination, self.close and explicit child termination while preserving an unrelated live worker's lock.
2026-11-03 18:08:20 +08:00
ldm0 b157a31c9b fix(cdp): update prepared document policy before commit publication
Route restricted network policy updates through the registered pending Page and renderer agent before its Document token reaches protocol. Recheck the native agent and existing Document identity across action flushes before acknowledging the update.

Add a deterministic unpublished-commit regression and verify that a different agent cannot mutate native settings.
2026-11-03 18:08:20 +08:00
ldm0 bd921fa7b2 fix(fetch): preserve metadata gates after main rebase
Route untagged script resource requests through the shared per-destination
Fetch Metadata helper. Cover all four script resource kinds in the existing
trustworthiness and buffered/HTML/raw redirect matrices.

Remove duplicate cache-timing module registration and response cache-state
initialization introduced while replaying history onto main.

The extended policy test fails on the old fallback. Root fmt, strict
workspace/all-target/all-feature clippy and full nextest pass afterwards:
24,880 passed, 18 skipped, 32 threads, zero automatic retries.
2026-11-03 18:08:20 +08:00
ldm0 8d2a07f737 fix(runtime): finish iframe load callbacks before late descendants
Keep owner-element load and pageshow runnable when a load callback starts
a descendant navigation. Continue waiting for that descendant at FrameFinish
so ancestor Documents retain their load dependencies.

Cover six callback and descendant scenarios with a shared fixture and a
fixed default Chromium 152 oracle, and retain exact owner/phase assertions.

Validated with root fmt, strict workspace/all-target/all-feature clippy,
and full nextest: 24,870 passed, 18 skipped, 32 threads, zero automatic retries.
2026-11-03 18:08:20 +08:00
ldm0 cda6fc5a36 test(runtime): deduplicate referrer regression after main rebase
Keep one copy of the worker referrer network test, retaining its complete
assertions. Format the upstream Document referrer fixture after integrating
both independent fixture suites.

Validated with root cargo fmt, all-target/all-feature clippy, and full
nextest: 24,869 passed, 18 skipped, 32 threads, zero automatic retries.
2026-11-03 18:08:20 +08:00
ldm0 14a4d54356 test(runtime): preserve module registrations after main rebase
Keep the existing Gamepad registration and the new Geometry constructor
regression when replaying module moves onto main. Avoid registering the
moved Gamepad module a second time.
2026-11-03 18:08:20 +08:00
ldm0 e4a092aa3f fix(blob): partition child navigation and isolate cross-site popups
Authorize captured child Blob resources with the initiating Document's full
storage key, and carry that admitted result through navigation and history.
Denied resources commit an opaque error Document through the normal load
lifecycle instead of retrying an unscoped lookup or leaving load pending.

Apply Chromium's Blob-site versus top-level-site opener rule to newly
selected Window, anchor and area popups. Preserve existing named target
reuse, including its opener, as verified against Chromium.

Cover foreign and own child Blob URLs, same-site subdomain popup controls,
all three popup entries and existing named popup navigation.
2026-11-03 18:08:20 +08:00
ldm0 7bd993b9e6 fix(protocol): retain navigation until the initial Page is installed
Renderer output can publish a location change before protocol installs its
initial Page handle. Keep the immutable navigation with its existing build
completion, then revalidate the original Page residence before starting it.

Cover successful installation, failed builds and replaced Page reservations
through the production initial-document build path.
2026-11-03 18:08:20 +08:00
ldm0 c1d43a7ebd fix(runtime): finish native main integration
Register the Worker stream-clone regression module once after merging overlapping histories. Restore the established prepared-clone transfer-step layout to avoid unrelated code movement.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (24858 passed, 18 existing skips).
2026-11-03 18:08:20 +08:00
ldm0 73e4d645ee fix(blob): retain resolved resources across object URL revocation 2026-11-03 18:08:20 +08:00
ldm0 c75d6cde0b fix(worker): enforce storage keys for blob main scripts
Authorize Blob URL entry snapshots with the creator browser partition and complete storage key before reading backing data. Apply the same check to Window and nested DedicatedWorker scripts and SharedWorker main-script loading.

Report denied Blob loads through the existing asynchronous worker failure tasks. Cover classic/module workers across a cross-site ancestor, nested workers, and rejection before lazy backing I/O.
2026-11-03 18:08:20 +08:00
ldm0 d14a4990cf fix(websocket): serialize opening handshakes by resolved endpoint
Queue native TCP candidates by their resolved endpoint until the opening handshake ends. Preserve alias matching, proxy target scope, complete DNS answers and cancellation while waking only actual waiters.

Validate TCP ordering, FIFO, cancellation, timeout, shutdown, independent destinations and owners, proxy routing, fallback addresses and IPv4-mapped IPv6. Keep the page/worker owner lifecycle fixture pending on distinct ports.
2026-11-03 18:08:20 +08:00
ldm0 f7e775c653 fix(indexeddb): derive durability options and preserve transaction hints 2026-11-03 18:08:20 +08:00
ldm0 6a802bcc03 fix(indexeddb): apply transaction durability to native WAL writes 2026-11-03 18:08:20 +08:00
ldm0 3621c9002a fix(indexeddb): route schema renames through native transactions
Expose store and index names through branded prototype accessors and lossless
WebIDL conversion. Admit existing SQLite rename commands before publishing
COW metadata, native transaction scope and canonical handle keys. Preserve
original handle identity for upgrade abort, including deleted/reused names.

Prepare cursor continuations with current native labels at API admission
while preceding commands keep their FIFO names. Cover persisted data and
generators, rollback, native Proxies, shadows and conversion reentry.

Restore the preserved Window/child/worker rename probes and schema-attribute
rename sections with measured Chromium committing and abort expectations.
2026-11-03 18:08:20 +08:00
ldm0 793bc1aa72 fix(indexeddb): release collected transaction state
Register transactions with the existing collectible-wrapper finalizer and
remove lifecycle entries during the deferred sweep. Unreachable terminal
wrappers no longer leave native scope names and lifecycle metadata behind.

Keep queues and task payloads as active owners. Cover retained getters and
snapshots, commit/abort cleanup, queued writes without author roots, and
committed data readback under forced V8 GC.
2026-11-03 18:08:20 +08:00
ldm0 2d07dff6b7 fix(indexeddb): enforce native transaction store scopes
Store accepted UTF-16 names in native transaction state and expose
objectStoreNames as fresh DOMStringList snapshots. Schema edits and
upgrade rollback no longer read or write author-owned scope properties.

Check terminal state and native scope before returning canonical store
handles. Preserve Chromium's committing rejection and existing request
activity checks. Reuse native proxy identity and callee-realm bindings.
2026-11-03 18:08:20 +08:00
ldm0 8f6f6d16af test(renderer): budget complete async workflows for parallel runs
A page fixture may execute thousands of SQLite completions or dozens of
navigations. The shared eight-second whole-workflow guard repeatedly
expires at 32-way concurrency even when every focused workflow completes.

Use a finite 30-second workflow bound while retaining per-task guards,
completion assertions and original WPT deadlines. Validate with 32 tests
running concurrently and no retries.
2026-11-03 18:08:20 +08:00
ldm0 043f3d0d51 fix(cookies): enforce native SameSite access contexts
Apply per-cookie SameSite filtering to document reads with the ScriptGet context, preserving HttpOnly and privileged CDP access. Remove the implicit cross-site facade denial while retaining explicit cookie-disable policy and cache invalidation. Carry SameSite and navigation shape into canonical insertion policy before creation, overwrite or expiry deletion. Preserve Secure SameSite=None, same-site writes, top-level HTTP responses and CDP privilege; propagate precise rejection reasons. Correct old ScriptSet-based read diagnostics and cover generation stability on rejected writes.

Validation: four failing native reproductions before the policy fix; 339 cookie-crate tests; cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. All checks use 32 workers and zero automatic retries. Actual committed CLI WPT verification is recorded separately.
2026-11-03 18:08:20 +08:00
ldm0 e40c064341 fix(cookies): preserve navigation allowances across redirects
Remove a second subresource-only comparison that overwrote a correctly computed top-level SameSite context. Preserve the full context ordering so explicit CrossSite restrictions cannot gain the recent-cookie unsafe allowance. Capture real redirected HTTP Cookie headers across three transports, GET/POST, subresource and forced-cross-site controls. Correct five old diagnostic expectations against pinned Chromium while retaining existing exclusions, method and redirect metadata.

Validation: native cookie-jar/fetch suites (698 passed); cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency and zero automatic retries. The unchanged original WPT cohort supplied the Chromium baseline; final committed CLI WPT revalidation remains separate.
2026-11-03 18:08:20 +08:00
ldm0 a92773a888 test(indexeddb): bound the full cursor matrix with a caller wait budget
Keep every cursor case and all checks in Window, child and worker. Use the existing configurable Browser script wait for this long matrix, snapshot the result at settlement, and leave ordinary probe evaluation and the production45s awaitPromise cap unchanged.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 bb39206697 test(core): allow startup margin before navigation grace deadlines
Use a one-second total fetch budget while retaining the entered-decider assertion, the ten-second navigation grace, exact timeout reporting and owner-usability check. Bound the external harness below the grace duration; production deadline behavior is unchanged.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 78aa81668b test(indexeddb): align handler and upgrade checkpoints with Chromium
Keep inherited IDB handler coverage and remove its superseded own-handler copy. Retain upgrade transaction identity through complete-handler microtasks, clear it for the open result, and preserve all ordering/close/data assertions. The corrected 24-check fixture passes in Chromium152 Window, child, classic and module workers.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 e7e4402536 refactor(webapi): deduplicate interface exposure lists
Remove repeated names from worker and secure-context membership lists while preserving every unique interface.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 33017219a1 test(blob): retain lazy body reads and Blob realm ownership
Exercise Request/Response construction without starting source I/O, then release controlled success/error completions through native owner tasks. Check unreadable Blob bodies at consumption and use the Blob realm for borrowed read methods, matching pinned Chromium152.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 905f4a627d style: format native main integration
Apply rustfmt to the retained native Blob, IndexedDB clone, structured-clone and worker integration. Each file matches formatting its original HEAD contents exactly.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 b97c6188c5 fix(runtime): reconcile native Blob and FileReading integration
Preserve FileReading for public Blob reads and empty-stream EOF, while platform clipboard snapshots retain the native in-memory read path. Restore temporary task owner addresses before cross-realm continuations. Keep lazy I/O, FileReader phases and allocation-error settlement, and reconcile native task/binding imports.

Validation on the integrated workspace: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Cargo, Tokio and nextest use 32-way concurrency with no automatic retries. Intermediate commits were not independently gated.
2026-11-03 18:08:20 +08:00
ldm0 0cec6f3c26 test(xhr): cover expired upload timers without narrow network races
Add a controlled native regression for upload microtasks cancelling or extending an already-ready timeout. Keep the Window and worker HTTP matrix with scheduling margins suitable for parallel execution.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast. Checks cover the integrated workspace with 32-way concurrency and no automatic retries.
2026-11-03 18:08:20 +08:00