Commit Graph
5077 Commits
Author SHA1 Message Date
ldm0 03214ca7bf fix(storage): reconcile WPT state with SQLite partitions 2026-11-22 02:02:07 +08:00
ldm0 78a40c5760 fix(fetch): honor Document credentialless network policy 2026-11-22 02:02:07 +08:00
ldm0 278b4eb3dc fix(fetch): omit credentialless worker network credentials 2026-11-22 02:02:07 +08:00
ldm0 3d2c90ebc6 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-22 02:02:07 +08:00
ldm0 a261cf38e5 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-22 02:02:07 +08:00
ldm0 0068271311 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-22 02:02:07 +08:00
ldm0 9cb2f2426e 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-22 02:02:07 +08:00
ldm0 e2a15e6fe3 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-22 02:02:07 +08:00
ldm0 5ddfff40f7 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-22 02:02:07 +08:00
ldm0 8cf2a4c562 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-22 02:02:07 +08:00
ldm0 823110aa9c 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-22 02:02:07 +08:00
ldm0 e489014a19 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-22 02:02:07 +08:00
ldm0 2af692cb9f 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-22 02:02:07 +08:00
ldm0 1794df39c3 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-22 02:02:07 +08:00
ldm0 2f3e6f1d34 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-22 02:02:07 +08:00
ldm0 56e14455cc 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-22 02:02:07 +08:00
ldm0 ab4a65cc6b fix(blob): retain resolved resources across object URL revocation 2026-11-22 02:02:07 +08:00
ldm0 be14215ab6 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-22 02:02:07 +08:00
ldm0 aa3f384505 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-22 02:02:07 +08:00
ldm0 f198b6d9fd fix(indexeddb): derive durability options and preserve transaction hints 2026-11-22 02:02:07 +08:00
ldm0 d9533fe5dc fix(indexeddb): apply transaction durability to native WAL writes 2026-11-22 02:02:07 +08:00
ldm0 61a81a4a93 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-22 02:02:07 +08:00
ldm0 81c438601f 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-22 02:02:07 +08:00
ldm0 111d8890bf 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-22 02:02:07 +08:00
ldm0 ff881c72e1 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-22 02:02:07 +08:00
ldm0 49b33072da 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-22 02:02:07 +08:00
ldm0 65e1d74fc2 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-22 02:02:07 +08:00
ldm0 f857f849bf 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-22 02:02:07 +08:00
ldm0 fd5c39153c fix(cdp): preserve navigation ownership and inspector response order
Forward lossless CDP wire messages through native ownership workflows. Preserve exact earlier console output before terminal replies, and let old Inspector commands receive context-destruction results before their response routes retire.

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-22 02:02:07 +08:00
ldm0 bdf6986262 fix(input): preserve drag views and native pointer ownership
Retain source drag data identity and protected access, retire target views after dispatch, and preserve the initiating document and realm for pointer ownership and suppression. Use selected image URLs and preserve focused drop selections.

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-22 02:02:07 +08:00
ldm0 041ab38694 fix(indexeddb): retain native wrapper identity and abort ordering
Cache canonical object-store and index wrappers in their owner realms, release caches with native lifetimes, and retain pending-request AbortError ordering when cloning aborts a transaction. Exercise real auxiliary-page connection retirement.

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-22 02:02:07 +08:00
ldm0 f7e981e5e8 fix(dom): avoid conflicting serialized namespace declarations
Reserve literal xmlns-prefixed attribute spellings before selecting element prefixes, while retaining the attributes native namespace identity.

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-22 02:02:07 +08:00
ldm0 189bcad709 fix(runtime): adapt retained WPT surfaces to native main APIs
Use native Document ownership, mutation plans, event outcomes and resource APIs. Remove duplicate declarations and obsolete adapters while retaining the existing behavior coverage.

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-22 02:02:07 +08:00
ldm0 85f2f1adf3 style: format workspace after main integration
Apply the workspace formatter to retained code after rebasing main.

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-22 02:02:07 +08:00
ldm0 d551c42d42 fix(websocket): validate receivers with native brands
Use generated receiver validation for WebSocket methods, attributes, and event handlers. Resolve registered native Proxies to their shared state while preserving unbranded internal WebSocketStream records.

Declare the standard prototype toStringTag data property and reject missing send arguments before checking connection state. Cover cross-realm TypeError identity, author wrappers, and canonical native-Proxy event handlers.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (24,043 passed, 18 existing skips; 32 threads, no retries).
2026-11-22 02:02:07 +08:00
ldm0 8ed96a416d fix(websocket): downgrade early HTTP/2 negotiation failures 2026-11-22 02:02:07 +08:00
ldm0 f186c2e5ad feat(websocket): support native HTTP/2 extended CONNECT
Negotiate RFC 8441 after the peer advertises ENABLE_CONNECT_PROTOCOL, preserve
the CONNECT_ONLY stream through handshake completion, and reuse the native
WebSocket frame codec with bounded HTTP/2 receive and send flow control.

Translate native poll interests for WINDOW_UPDATE/TLS progress, reject writes
after stream reset, and retire unsupported H2 connections before the existing
HTTP/1.1 negotiation fallback. Keep TLS, proxy, DNS, owner and queue policies.
Correct the mixed-transport fixture to advertise each listener's protocol.

Validation: cargo fmt --all; strict workspace/all-targets/all-features clippy;
cargo nextest run --no-fail-fast (24036 passed, 18 existing skips). All 24031
previous passing test IDs retained; five new native/handshake regressions.
2026-11-22 02:02:07 +08:00
ldm0 d0c9af463b fix(fetch): align HTTP/1 status prefixes with Chromium
Extend the existing private browser response-header adapter to locate
case-insensitive HTTP within four leading non-NUL bytes, including
newlines and fragmented reads. Preserve the native fast path, reject
five-byte and NUL prefixes, and charge removed bytes to the header limit.

Keep protocol detection and normalization in one shim and retain the
upstream-source replacement guards. Cover all three Fetch transports,
binary bodies, and informational responses without changing existing
tests or request deadlines.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(24031 passed, 18 existing skipped, 32 jobs/threads, zero retries).
2026-11-22 02:02:07 +08:00
ldm0 5c9f14cae5 fix(fetch): check idle connections before reuse
Backport curl 774d3bff38515beb75c6d86c3e0455f0c8da7c9e so pending
input on an idle connection is checked even within the one-second
health-check window. Delayed bytes after a completed 304 response must
not become the status line of the next XHR request.

Cover buffered, HTML-streaming and raw-streaming Fetch requests with a
barrier-controlled regression. Keep the existing valid keep-alive reuse
test unchanged.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(24029 passed, 18 existing skipped, 32 jobs/threads, zero retries).
2026-11-22 02:02:07 +08:00
ldm0 63ed197b24 fix(runtime): resolve bound owners without V8 property lookups
Resolve Window hosts and Worker state through the existing Context owner binding. Failed stream-transfer cleanup then preserves pending exceptions and avoids author bridge getters. Keep weak ownership and the pre-binding bootstrap fallback.
2026-11-22 02:02:07 +08:00
ldm0 df14e51d00 fix(streams): serialize transfer chunks as port messages 2026-11-22 02:02:07 +08:00
ldm0 0c687003b3 fix(streams): report transfer deserialization errors to peers 2026-11-22 02:02:07 +08:00
ldm0 b601b1c7a5 fix(messaging): prepare Window transfers before target checks 2026-11-22 02:02:06 +08:00
ldm0 9480b85751 test(xhr): gate timeout-before-upload controls with preflight
The first-report timeout controls assumed that an 80ms busy task would
finish before the network service's 100ms reporting interval. Scheduler
preemption can invalidate that assumption; fixed Chromium 152 also emits
upload completion before the delayed XHR timeout when that happens.

Hold a CORS preflight on a second loopback origin for the two controls
that require no upload report. No body can be transmitted while the
preflight is pending, regardless of task overrun. Preserve every event
assertion and all 16 cases in both Window and Worker, including the normal
network's positive completion/reporting cases. Abort both owned servers
when the CLI run ends.

Independent normal and 160ms-overrun controls match Chromium and the
published-parent debug/release binaries on all 24 cases; each profile
observes six held preflights and zero POST requests to the held endpoint.
2026-11-22 02:02:06 +08:00
ldm0 46f3c20aa5 fix(timers): clamp nested Window and worker callbacks
Track nesting per target execution context and apply the 4ms minimum after six callbacks. Retain the level through microtasks to match Chromium, restore it before asynchronous follow-up, and keep browser algorithm timeouts independent. Cover interval, function, source, microtask, reset and exception paths; make the existing stream termination fixture wait for real timer deadlines.
2026-11-22 02:02:06 +08:00
ldm0 e95cab00d7 fix(runtime): finish parser script cleanup after engine termination 2026-11-22 02:02:06 +08:00
ldm0 6a01d951fb fix(dom): share scoped registries across native owners 2026-11-22 02:02:06 +08:00
ldm0 520907a372 fix(dom): preserve registry data on realm retirement 2026-11-22 02:02:06 +08:00
ldm0 47b7f767d8 refactor(dom): separate registry data from native element state 2026-11-22 02:02:06 +08:00
ldm0 288ed5ed5e perf(dom): reuse document registry resolution during serialization 2026-11-22 02:02:06 +08:00