Commit Graph
2769 Commits
Author SHA1 Message Date
ldm0 2e4fa728e8 refactor(cookies): store creation times as Unix microseconds 2026-11-02 11:09:13 +08:00
ldm0 7af087d8ab fix(import): preserve browser cookie creation timestamps 2026-11-02 11:09:13 +08:00
ldm0 66aec1d3b5 fix(cookies): report the canonical SameSite mode after overwrite 2026-11-02 11:09:13 +08:00
ldm0 8b0701deeb fix(cookies): apply age-aware Lax-by-default request policy
Record and preserve cookie creation time across updates, browser imports and cache persistence. Apply modern Lax-by-default request inclusion, including the age-bounded unsafe top-level navigation allowance; keep explicit Lax and Strict semantics, raw cookie visibility and diagnostic exclusion reasons. Cover age boundaries, updates, imports, persistence and navigation contexts.
2026-11-02 11:09:13 +08:00
ldm0 b30f39c580 fix(fetch): preserve combined Content-Type syntax in Body.blob()
fix(fetch): preserve combined Content-Type syntax in Body.blob().

Extracted from development commit 8123cb6e9f8 and adapted to main.

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 138.308s] 22166 tests run: 22166 passed (9 slow), 20 skipped
2026-11-02 03:11:27 +08:00
ldm0 c33d3846a0 perf(sqlite): share Tokio task machinery across storage owners
Erase async task body types at RuntimeHandle::spawn so SQLite owner loops
share Tokio scheduler code. Keep blocking SQL work and results concrete,
and retain the existing task admission, failure collection and shutdown.

This boxes each submitted async task once; normal SQL commands do not gain
an additional box. The original Linux x86_64 release profile, followed by
strip --strip-all, decreases from 111026760 to 110965320 bytes (60 KiB).

Validation: cargo fmt --all; full workspace Clippy with all targets/features
and -D warnings; Nextest 22154 passed, 20 skipped; CDP smoke 92/92 on both
Moli and actual Chrome 145.
2026-11-02 03:10:27 +08:00
ldm0 fe15e4b73e fix(fetch): preserve raw Location bytes across redirect paths
fix(fetch): preserve raw Location bytes across redirect paths.

Extracted from development commit 7e5a9cbf8191b2ff2aa8afd9d6a298eb86e1aab1 and adapted to main.

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 179.354s] 22167 tests run: 22167 passed (9 slow), 20 skipped
2026-11-02 02:03:43 +08:00
ldm0 378e338863 fix(shared-worker): keep agent isolation independent of creator policies
fix(shared-worker): keep agent isolation independent of creator policies.

Extracted from development commit b11470a111d and adapted to main.

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 152.012s] 22166 tests run: 22166 passed (9 slow), 20 skipped
2026-11-02 01:50:32 +08:00
ldm0 28701350d9 refactor(canvas): derive clearRect receivers and numeric arguments 2026-11-01 18:27:52 +08:00
ldm0 830dbac358 fix(dom): compare foreign node trees in their own arenas 2026-11-01 18:27:24 +08:00
ldm0 a75ca04c98 refactor(dom): derive required nullable Node namespace arguments 2026-11-01 15:47:43 +08:00
ldm0 0a5568eb3e fix(xml): derive and validate XMLSerializer Node arguments 2026-11-01 15:47:17 +08:00
ldm0 ad7e07779d test(fonts): cover lazy FontFace loaded rejection ownership 2026-11-01 15:43:47 +08:00
ldm0 cc44a81242 test(webidl): cover BufferSource partial write bounds 2026-11-01 15:43:35 +08:00
ldm0 549a61775a test(dom): preserve MutationRecord node lists across replacement 2026-11-01 15:43:13 +08:00
ldm0 623e52e12a test(cssom): cover Typed OM font shorthand and adjustment snapshots 2026-11-01 15:42:58 +08:00
ldm0 4883dab2e0 test(webidl): cover ordered derived dictionary sequences 2026-11-01 15:41:50 +08:00
ldm0 c32c7fde5c test(svg): cover fill rules and nonfinite query points 2026-11-01 15:41:11 +08:00
ldm0 e855f86dbb test(webidl): cover clamped unsigned long derived conversions 2026-11-01 15:40:59 +08:00
ldm0 d9b080b1f2 fix(dom): derive slot assignment option dictionaries
Convert assignedNodes and assignedElements options with the shared WebIDL dictionary/argument derives. Preserve flatten semantics and propagate getter and conversion exceptions through the common binding path, with targeted slot regressions. Enable the existing generated HTMLSlotElement receiver check so invalid and Proxy receivers fail before dictionary getters and use the callee TypeError realm.
2026-11-01 05:27:58 +08:00
ldm0 768ba6e400 test(storage): cover first-party quota isolation and implicit OPFS 2026-11-01 05:19:55 +08:00
ldm0 244192dccb refactor(storage): remove unused cross-partition usage APIs 2026-11-01 05:19:55 +08:00
ldm0 f11c7cbf32 fix(storage): scope CDP quota usage to first-party StorageKey 2026-11-01 05:19:55 +08:00
ldm0 7fa20ba1a5 fix(cookies): restore Secure cookies independently of source scheme 2026-11-01 04:57:03 +08:00
ldm0 3b76d63b3a refactor(sqlite): unify writeback failure handling 2026-11-01 04:03:38 +08:00
ldm0 a598b45216 refactor(storage): remove unused persistence APIs 2026-11-01 04:03:38 +08:00
ldm0 800e2d1852 refactor(cookies): restore directly into the canonical jar 2026-11-01 04:03:38 +08:00
ldm0 1efebf3f53 refactor(import): report accepted and rejected cookie writes 2026-11-01 04:03:38 +08:00
ldm0 87d86218b2 refactor(storage): remove derived localStorage metadata and early view flushes 2026-11-01 04:03:38 +08:00
ldm0 208c670738 refactor(cookies): keep access touches in memory 2026-11-01 04:03:38 +08:00
ldm0 5e50fbc145 refactor(sqlite): use FIFO flush barriers without sequence acknowledgements 2026-11-01 04:03:38 +08:00
ldm0 843ddcc3f2 refactor(storage): retire protocol cookie profiles and close partitions once 2026-11-01 04:03:38 +08:00
ldm0 c5b6267006 fix(storage): count UTF-16 keys and values toward Web Storage quota 2026-11-01 04:03:38 +08:00
ldm0 f1ab617cf2 refactor(storage): remove automatic SQLite writeback retries
Discard failed Cookie batches without requeueing, following Chromium's commit
behavior. Preserve the live canonical jar and the normal 30-second/512-operation
schedule for new mutations, and report persistence errors without replaying the
old batch on flush/close.

Remove backoff state, error classification, and per-call failure admission.
Retain explicit-flush recovery only for localStorage, whose absolute area
metadata must stay paired with its failed entry deltas.

Cover idle failures, subsequent batch deadlines and operation thresholds,
non-replaying flush/close, Cookie jar versus SQL state, and actual SQLITE_FULL
recovery by explicit localStorage flush.
2026-11-01 04:03:38 +08:00
ldm0 78a03ac16d refactor(storage): bind area retention to native Window lifetime
Share one localStorage area lease per existing LocalWindow owner instead of
private wrapper IDs and a separate finalizer registry. Release native areas on
Window retirement, context teardown, or partition replacement; document.open
and repeated installation of the same handles retain the live area.

Dirty batches continue to pin areas through commit. Cover popup and iframe
retirement while JS retains Storage wrappers, full page teardown without GC,
and partition rebinds without stale cache reuse.
2026-11-01 04:03:38 +08:00
ldm0 42680d286e refactor(storage): apply idempotent deltas without existence tracking
Keep the latest Put or Delete for each key rather than eliding transient-row
deletes. Remove existed from Cookie and localStorage deltas and Cookie mutation
observers, then remove the shared uncertain-commit correction hook. Preserve
Cookie Touch composition and atomic, idempotent retry behavior.

Replace optimization-specific assertions with actual SQL replay tests covering
a published put followed by deletion and clear followed by a newer put.
2026-11-01 04:03:38 +08:00
ldm0 59743d9466 refactor(storage): remove the legacy JSON Web Storage backend
Keep SQLite for persisted localStorage and memory for sessionStorage. Remove
the unused JSON backend, serialization types, constructors, reexports, and
dependencies. Explicit external data imports still target SQLite; older JSON
profile files remain untouched without automatic migration.
2026-11-01 04:03:38 +08:00
ldm0 f2c2b89266 refactor(storage): remove unused origin Web Storage usage aggregation
Remove the origin-wide Web Storage quota API and its unused SQLite key listing.
CDP and navigator quota queries already exclude Web Storage. Retain single-area
metadata reads and the indexed entry-count query needed for cold origin clears.
2026-11-01 04:03:38 +08:00
ldm0 18c379855a perf(storage): clear cold localStorage areas without loading entries
Use area entry counts to accept clear deltas directly. Keep empty logical maps
pinned until those deltas commit so later reads cannot reload stale SQL rows.
Order deletion and later puts through the existing writeback FIFO and retain
live areas across metadata queries and older commit acknowledgements.

Cover cold value corruption, zero-byte nonempty areas, repeated clear events,
subsequent puts, restart persistence, and an older queued commit racing clear.
2026-11-01 04:03:38 +08:00
ldm0 19863df019 perf(storage): query localStorage usage from area metadata
Read persisted usage without materializing cold key/value maps, and overlay
pinned live area sizes for uncommitted updates, additions, and clears. Use a
bounded storage-key index range instead of applying substr to every row.

Verify cold maps remain uninitialized, dirty sizes replace persisted metadata,
and the actual SQLite query plan uses equality and bounded index searches.
2026-11-01 04:03:38 +08:00
ldm0 43feec65be fix(storage): exclude Web Storage from quota-managed usage
Align StorageManager.estimate and CDP Storage.getUsageAndQuota with Chromium's
quota clients. Report IndexedDB, Cache Storage, and OPFS by backend, including
named and implicit-default bucket data, without touching local/sessionStorage.
Keep Web Storage's independent per-area quota unchanged.

Cover Web Storage exclusion, an unopened or closed SQLite localStorage backend,
default and named OPFS data, bucket attribution, and command-session isolation.
2026-11-01 04:03:38 +08:00
ldm0 1e09077598 fix(import): report canonical cookie acceptance and rejection
Count only writes accepted by the canonical store, aggregate rejection reasons,
and separately report the destination's final unexpired cookie count. This
makes rejected records, replacements, and quota eviction visible to CLI users.

Cover partial and complete rejection, duplicate identities, existing cookies,
and per-domain quota eviction against persisted SQLite contents.
2026-11-01 04:03:38 +08:00
ldm0 d0a8d7ae19 fix(storage): retry recoverable SQLite writeback failures
Preserve SQLite error codes and retry atomic batches after transient resource,
locking, and I/O failures. Back off from one second to a capped sixty-second
interval without letting new mutations bypass the delay. Successful commits
restore localStorage admission; permanent errors still require explicit retry.

Verify bounded scheduling with virtual time and real SQLITE_FULL recovery
without a second flush, including restart persistence and new writes.
2026-11-01 04:03:38 +08:00
ldm0 6584ff274f refactor(storage): keep SQLite databases directly in partition directory 2026-11-01 04:03:38 +08:00
ldm0 5e6482996e feat(storage): open Cookie and localStorage databases on first use 2026-11-01 04:03:38 +08:00
ldm0 b5cf04a307 refactor(storage): switch SQLite namespaces without JSON migration 2026-11-01 04:03:38 +08:00
ldm0 4649cb1256 feat(storage): use partition SQLite cookies and localStorage by default 2026-11-01 04:03:38 +08:00
ldm0 6708ecf8ac feat(profile): stage and recover atomic SQLite cookie and localStorage migration 2026-11-01 04:03:38 +08:00
ldm0 2defc40820 feat(cookies): persist canonical cookie deltas in SQLite 2026-11-01 04:03:38 +08:00
ldm0 03e09d240c feat(storage): add asynchronous SQLite Web Storage areas and flush barriers 2026-11-01 04:03:38 +08:00