Commit Graph
2656 Commits
Author SHA1 Message Date
ldm0 340ae7befb fix(indexeddb): preserve request order after preparation errors 2026-10-30 20:27:08 +08:00
ldm0 69bd05662d test(protocol): serialize shared cookie checkpoint writes 2026-10-30 20:27:08 +08:00
ldm0 cf802a0acd fix(indexeddb): expose native readonly schema attributes
Expose IDBObjectStore and IDBIndex readonly attributes through generated branded prototype getters. Keep immutable flags, cached keyPath values and parent references in V8-traced private slots on ordinary and failed schema handles; indexNames reads the current SQLite metadata mirror. Remove obsolete public-property rewrites so author shadows and cached arrays survive schema edits and rollback. Preserve collectible wrappers and native Proxy/cross-realm behavior. Use the shared lossless SQLite schema-name model, independently of mutable rename; mutable name behavior remains a separate topic. Retain all readonly/identity/rollback assertions from the original fixture and save its full rename integration matrix for the SQLite rename work.
2026-10-30 17:50:36 +08:00
ldm0 b52ca510ea fix(indexeddb): preserve UTF-16 schema names through SQLite
Carry store and index names as IndexedDbName code units through WebIDL DOMString16 conversion, transaction scopes/admission, metadata, queued operations, cursors and DOMStringList. Store labels as ordered UTF-16BE BLOBs in SQLite schema v3; migrate known v1/v2 tables transactionally while preserving stable ids, records, indexes, generators and logical usage. Reuse the database-name codec and existing SQL command FIFO. Add exact surrogate/replacement/NUL/astral name operations in Window, iframe and Worker, plus native disk restart and malformed-label migration rollback/retry tests. This prerequisite supplies the lossless name model needed by the separate index/store rename setters.
2026-10-30 17:50:36 +08:00
ldm0 8564d0a23f fix(indexeddb): preserve UTF-16 database name identity
Preserve database DOMString names as IndexedDbName code units across derived WebIDL conversion, native connection FIFO, SQL service identity, IDBDatabase.name and databases() results. Store database names as UTF-16BE BLOBs in SQLite schema v2. Migrate v1 TEXT metadata inside one SQL transaction after owner/name/generation validation, keeping records, stable ids, generators and logical quota accounting. Extend the existing generation-path hash with canonical WTF-8 so legacy Unicode directory paths remain unchanged. Retain the complete original Window/iframe/Worker conversion, independent-record/version, abort, deletion and cross-agent matrix. Add real disk-profile restart plus legacy migration/failure, exact queue identity, path compatibility and quota-rollback regressions. This database-name topic is independent of object-store/index rename and readonly schema attributes.
2026-10-30 17:50:36 +08:00
ldm0 53fd3f6fd8 feat(indexeddb): add transactional SQLite schema renames
Add native SQL-owner commands for object-store and index renaming during a versionchange transaction. Resolve accepted names after preceding CREATE commands on the existing FIFO, then update only the stable store/index id label; records, index entries and key generators retain their identities. Keep name usage accounting inside the request SAVEPOINT, preserve committed snapshots until COMMIT, and let SQLite roll back aborts and quota failures. Cover duplicate and missing names, no-op/empty names, name reuse, queued create/write/rename ordering without an id round trip, and a real disk catalog restart. This is a direct-main prerequisite for the separate Web API rename work; store/index names retain the existing native TEXT model in this PR.
2026-10-30 17:50:36 +08:00
ldm0 045041566f fix(storage): use temporary disk backing without a profile 2026-10-30 15:53:29 +08:00
ldm0 e97641f7a9 test(indexeddb): retain live cursor mutation coverage on SQLite
Carry the complete live cursor mutation matrix from superseded #1341 onto SQLite, without its snapshot rescanning implementation. Cover writes during iteration, pending cursor values, forward/reverse and unique directions in Window, iframe and Worker contexts.
2026-10-30 11:09:24 +08:00
ldm0 b915eee210 fix(storage): handle long Windows catalog paths without hanging tests 2026-10-30 04:40:18 +08:00
ldm0 13c7edab5a ci: cache Windows persistence builds and use nextest 2026-10-30 04:40:18 +08:00
ldm0 9939abc2c6 feat(webidl): add Clamp unsigned long conversion 2026-10-30 04:26:11 +08:00
ldm0 e3911cf75b feat(indexeddb): extend native geometry snapshots with shared codecs 2026-10-30 04:17:00 +08:00
ldm0 d83d09783d feat(geometry): clone native point quad and matrix values 2026-10-30 04:17:00 +08:00
ldm0 6ced0035f8 fix(geometry): preserve DOMMatrix dimension state 2026-10-30 04:17:00 +08:00
ldm0 31259c2bd6 feat(geometry): implement native DOMQuad bindings 2026-10-30 04:17:00 +08:00
ldm0 8964081e33 fix(geometry): implement DOMPointReadOnly construction and factory 2026-10-30 04:17:00 +08:00
ldm0 9dcb5191c6 feat(midi): retain native message and connection event payloads
Implement MIDIMessageEvent and MIDIConnectionEvent with readonly retained Uint8Array/MIDIPort identity, shared dictionary conversion and native interface receiver validation. The shared Uint8Array policy rejects unsupported buffer shapes before event construction; MIDIPort conversion permits genuine foreign/native proxy identities and rejects author proxies. Tests cover optional members, access order, exception identity, detached buffers, live byte writes and cross-realm payload getters. MIDI device discovery and delivery remain separate.
2026-10-30 04:14:12 +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 907a27de0c fix(cdp): preserve prepared documents when enabling Page
Page.enable must acknowledge a native Document that is already running while protocol Page adoption waits for resources. Reuse the prepared-document lifecycle state instead of starting another lazy initial navigation, which can revoke the existing work and deadlock behind Fetch interception. The regression holds a script response, enables Page before adoption, verifies the original paused Fetch remains valid, and checks the final URL for both normal and crashed targets.
2026-10-30 04:14:12 +08:00
ldm0 6522cf7fde chore(release): update version to 1.1.20 2026-10-30 03:35:12 +08:00
ldm0 961afd5c56 refactor(indexeddb): remove unused transaction scheduler modes 2026-10-30 03:31:32 +08:00
ldm0 273ce0519d refactor(indexeddb): remove shared in-flight memory budgets 2026-10-30 03:31:32 +08:00
ldm0 d8755b9ff9 refactor(indexeddb): replace task tickets with one data byte budget 2026-10-30 03:31:32 +08:00
ldm0 c39e57481e refactor(indexeddb): remove metadata budgets and allocation leases 2026-10-30 03:31:32 +08:00
ldm0 7f96bc9280 refactor(indexeddb): remove registration and admission queue limits 2026-10-30 03:31:32 +08:00
ldm0 b140cd328f refactor(indexeddb): remove residual renderer compatibility paths 2026-10-30 03:31:32 +08:00
ldm0 1e12dbd313 refactor(indexeddb): drop legacy JSON key encoding 2026-10-30 03:31:32 +08:00
ldm0 426c044578 fix(indexeddb): retire live SQL owners after worker failure 2026-10-30 03:31:32 +08:00
ldm0 29bc89071c refactor(indexeddb): require SQL metadata budgets and refresh benchmarks 2026-10-30 03:31:32 +08:00
ldm0 699464bd5d test(wpt-cross): refresh cases from full post-SQLite run
Refresh classifications from the unfiltered all-profile CDP run of
14,064 cases against the release build of 909ea48c37.

Results: 10,282 pass, 3,503 fail, 246 timeout, 25 harness-stalled,
7 error, and 1 existing crash. IndexedDB has 396 pass, 46 fail,
and no timeouts; all 35 original regression cases and 660 subtests pass.

Keep the first full-run results, including two Trusted Types stalls
and the existing Worker CSP timeout. Candidate reruns passed on both
HEAD and the pre-migration baseline; subsequent neighbor runs also
passed without replacing the original full-run classifications.

Validation: full WPT Cross run, case-list/report integrity checks,
and git diff --check. No Rust source or build metadata changes.
2026-10-30 03:31:32 +08:00
ldm0 4a271e0796 test(wpt-cross): refresh SQLite migration case classifications
Refresh the full-run case lists and merge the 35 verified regression recoveries. Keep unmeasured cases at their full-run classifications.
2026-10-30 03:31:32 +08:00
ldm0 9f6f909c6f fix(indexeddb): admit concurrent readers by object-store scope 2026-10-30 03:31:32 +08:00
ldm0 c8a04cbc6f fix(indexeddb): backpressure SQL execution without retaining slots 2026-10-30 03:31:32 +08:00
ldm0 c4f5cb11bb fix(indexeddb): validate schema key paths before SQL admission 2026-10-30 03:31:32 +08:00
ldm0 26a50c0116 refactor(indexeddb): remove JSON backend and whole-database working copies
Keep IndexedDbManager as the owner of a required SQLite service, with committed usage and shutdown access. Remove the synchronous storage API, legacy persistence and transaction data copies.

Delete bucket IDB owner-key imports while preserving durable bucket identities, pending deletion and CacheStorage recovery. Port storage fixtures and the native benchmark to actual SQL connections and commands; retain generic key/direction tests and port cold-reopen and invalid-key transaction contracts to SQLite.

Validation: cargo fmt --all; workspace Clippy with all targets/features and -D warnings; nextest 21,815 passed,19 skipped;229 native/storage tests passed all20 stress iterations;memory/disk benchmark smoke passed.
2026-10-30 03:31:32 +08:00
ldm0 6a1b3240ae refactor(indexeddb): use native SQL connection lifecycle throughout renderer
Remove synchronous factory and transaction lifecycle fallbacks and the legacy blocked-open coordinator. Require SQL clients when creating database wrappers and refresh metadata directly from the committed snapshot.

Route exact Window and popup retirement to native SQL connections through weak references. Closing a shared-realm popup now releases its upgrade blockers without closing the opener or retaining collected wrappers.

Validation: cargo fmt --all; workspace Clippy with all targets/features and -D warnings; nextest 21,858 passed, 19 skipped; 495 related tests passed all 20 stress iterations. Preserved independent protocol baseline failures in local evidence.
2026-10-30 03:31:32 +08:00
ldm0 1a61bea2db refactor(indexeddb): remove legacy renderer data executors
Route record, index, schema and cursor operations through the shared SQL dispatcher. Delete synchronous manager executors and full-store snapshots, and stop retaining their duplicate request state.

Validation: cargo fmt --all; workspace Clippy with all targets/features and -D warnings; nextest 21,859 passed, 19 skipped; 353 related tests passed all 20 stress iterations.
2026-10-30 03:31:32 +08:00
ldm0 068941f411 refactor(indexeddb): use SQLite across renderer storage entry points
Route the public manager constructor through the SQLite service, including protocol ephemeral browser contexts. Match injected bucket owners and run existing storage fixtures through native completions and the Page task dispatcher.
2026-10-30 03:31:32 +08:00
ldm0 d84af05bf2 fix(indexeddb): abort in-flight requests before transaction events 2026-10-30 03:31:32 +08:00
ldm0 620ce7735f feat(indexeddb): enable SQLite for browser partitions 2026-10-30 03:31:32 +08:00
ldm0 c3cc444ea1 feat(storage): run bucket metadata and expiry cleanup on storage workers 2026-10-30 03:31:32 +08:00
ldm0 e65da80ecc fix(storage): durably publish bucket identities before exposing them 2026-10-30 03:31:32 +08:00
ldm0 3aceb8a3e2 fix(indexeddb): close partition SQL before releasing profile locks 2026-10-30 03:31:32 +08:00
ldm0 24af92a4ac feat(indexeddb): complete bucket deletion on storage workers
Reserve bounded cleanup work before dispatch, serialize duplicate tombstones under the existing quota coordinator, and resolve the accepting Page or Worker promise after SQLite and OPFS cleanup. Keep accepted deletion alive after Page retirement and protect same-name replacement buckets with their exact identity.
2026-10-30 03:31:32 +08:00
ldm0 bda47c16f6 fix(indexeddb): preserve close ordering and inline abort events
Publish native connection closure after notification unregistration so versionchange checkpoints cannot latch a stale blocked event. Route rejected inline cancellation through rollback and abort delivery for live owners, keeping request errors before transaction aborts.
2026-10-30 03:31:32 +08:00
ldm0 e26389031c feat(indexeddb): add fenced owner cleanup on SQL workers
Reserve bounded cleanup metadata and one control slot before fencing an owner. Close each database on its SQL lane, retire generation directories, cancel accepted factory requests and only then allow a new generation. Return logical connection retirement capacity at the native close receipt even when callers retain closed wrappers.
2026-10-30 03:31:32 +08:00
ldm0 2fd7e9325e feat(indexeddb): enforce bucket quota in SQLite transactions
Check request SAVEPOINTs and COMMIT against committed bucket usage shared with CacheStorage and OPFS. Acquire quota on the storage worker, retain reservations through publication, and finish rejected deferred submissions only after native rollback confirmation.
2026-10-30 03:31:32 +08:00
ldm0 26b225b5f2 fix(indexeddb): remove per-worker SQLite connection limit 2026-10-30 03:31:32 +08:00
ldm0 3b74cb177c test(indexeddb): cover WebIDL version limits and persistence
Cover maximum exact WebIDL versions through native transaction rollback,
regular writes, catalog recovery and real factory events and reopens.
Assert synchronous rejection above 2^53-1 and preserve the native overflow
guard, original generation and stored records.
2026-10-30 03:31:32 +08:00
ldm0 c11e0220b3 feat(indexeddb): route web factory requests through SQLite owners
Resolve open/delete through the native connection FIFO and owner completion
tasks. Bind actual Page/Worker database lifetimes to native connections and
retain request leases through their event microtask checkpoint.

Separate the worker-owning Service from clonable ServiceClient handles. Wake
all factory requests on shutdown, and wait for an in-flight close receipt
before acknowledging versionchange to avoid spurious blocked events.

Roll back failed or interrupted upgrades before following opens proceed,
preserve explicit COMMIT, and cover real web APIs, Worker retirement, disk
restart, legacy-directory isolation and native shutdown failures.
2026-10-30 03:31:32 +08:00