Commit graph

125 commits

Author SHA1 Message Date
stelar7
da56c1b1eb LibWeb/IDB: Implement IDBTransaction::commit 2025-04-10 19:12:30 -06:00
stelar7
b6b00acbd1 LibWeb/IDB: Implement abort and wait steps for closing a connection 2025-04-10 19:12:30 -06:00
stelar7
fc93ec135e LibWeb/IDB: Keep track of the connection used to start a transaction 2025-04-10 19:12:30 -06:00
stelar7
d1dabb9039 LibWeb/IDB: Make close_a_database_connection take a GC::Ref 2025-04-10 19:12:30 -06:00
stelar7
7c3de67b16 LibWeb/IDB: Dont set the forced flag when aborting connection 2025-04-10 19:12:30 -06:00
stelar7
f1fba24538 LibWeb/IDB: Add ObjectStore to IDBDatabases store set 2025-04-09 11:48:49 -06:00
stelar7
1fc2d6f1af LibWeb/IDB: Comment out infinite loop while waiting for next PR
Since the steps needed to avoid this loop is quite long,
adding this as a fixme for the future will make this PR easier to review
2025-04-09 11:48:49 -06:00
stelar7
6ec914c7f7 LibWeb/IDB: Add some debug output 2025-04-09 11:48:49 -06:00
stelar7
4084a127de LibWeb/IDB: Change reference to a GC::Ref in abort_a_transaction 2025-04-09 11:48:49 -06:00
stelar7
5298ecfc94 LibWeb/IDB: Implement IDBTransaction attributes
This also uncovered a bug, where the transactions type was never set :^)
2025-04-09 11:48:49 -06:00
stelar7
718c805e95 LibWeb/IDB: Implement IDBObjectStore::deleteIndex 2025-04-09 11:48:49 -06:00
stelar7
fce936e05a LibWeb/IDB: Implement IDBObjectStore::index 2025-04-09 11:48:49 -06:00
stelar7
fba7ad6969 LibWeb/IDB: Implement IDBObjectStore::indexNames 2025-04-09 11:48:49 -06:00
stelar7
3367352991 LibWeb/IDB: Implement IDBObjectStore::createIndex 2025-04-09 11:48:49 -06:00
stelar7
a235dd4300 LibWeb/IDB: Fillout IDBIndex attributes 2025-04-09 11:48:49 -06:00
stelar7
9321ad04c0 LibWeb/IDB: Add internal Index object 2025-04-09 11:48:49 -06:00
R-Goc
28d5d982ce Everywhere: Remove unused private fields
Some checks are pending
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (arm64, macos-15, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (x86_64, ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit removes the -Wno-unusued-private-field flag, thus
reenabling the warning. Unused field were either removed or marked
[[maybe_unused]] when unsure.
2025-04-04 12:40:07 +02:00
Jelle Raaijmakers
006f276cab LibWeb: Copy IDBDatabase object stores through Vector(ReadonlySpan)
Prevents a crash because `ReadonlySpan.copy_to()` was trying to copy to
an empty vector.

Fixes #4127.
2025-03-27 23:13:32 +00:00
stelar7
209d05fcb4 LibWeb/IDB: Implement IDBDatabase::deleteObjectStore 2025-03-27 15:47:16 +00:00
stelar7
b11276e5c4 LibWeb/IDB: Implement IDBDatabase::objectStoreNames 2025-03-27 15:47:16 +00:00
stelar7
1ad9b3ee6e LibWeb/IDB: Implement create_a_sorted_name_list 2025-03-27 15:47:16 +00:00
stelar7
3879391fa6 LibWeb/IDB: Implement IDBObjectStore::name 2025-03-27 15:47:16 +00:00
stelar7
2e02b62126 LibWeb/IDB: Implement IDBObjectStore::autoIncrement 2025-03-27 15:47:16 +00:00
stelar7
b0453e044d LibWeb/IDB: Implement IDBObjectStore::transaction 2025-03-27 15:47:16 +00:00
stelar7
594ba28c35 LibWeb/IDB: Implement IDBObjectStore::keyPath 2025-03-27 15:47:16 +00:00
stelar7
1057c88fdd LibWeb/IDB: Implement IDBDatabase::createObjectStore 2025-03-27 15:47:16 +00:00
stelar7
3c5578cc87 LibWeb/IDB: Add internal ObjectStore type 2025-03-27 15:47:16 +00:00
stelar7
0979a154fd LibWeb/IDB: Implement is_valid_key_path 2025-03-27 15:47:16 +00:00
stelar7
c276c212a0 LibWeb/IDB: Implement KeyGenerator 2025-03-27 15:47:16 +00:00
stelar7
1844e10cd3 LibWeb/IDB: Correctly check if transaction was aborted
Some checks are pending
CI / Lagom (arm64, Sanitizer_CI, false, macos-15, macOS, Clang) (push) Waiting to run
CI / Lagom (x86_64, Fuzzers_CI, false, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, false, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (x86_64, Sanitizer_CI, true, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
The associated databases upgrade transaction could be
null at the time we try to access it here.
2025-03-25 10:50:03 +00:00
stelar7
e8b7447c36 LibWeb/IDB: Abort transaction in database upgrade if needed 2025-03-25 10:50:03 +00:00
stelar7
923927564d LibWeb/IDB: Set the source of a IDBRequest 2025-03-25 10:50:03 +00:00
Andreas Kling
53da8893ac LibJS: Replace PropertyKey(char[]) with PropertyKey(FlyString)
...and deal with the fallout.
2025-03-24 22:27:17 +00:00
stelar7
664c57af16 LibWeb/IDB: Implement IDBFactory::databases() 2025-03-14 08:54:39 +01:00
stelar7
a0b252c0dd LibWeb/IDB: Update convert_a_value_to_a_key to latest changes 2025-03-13 11:23:15 +01:00
stelar7
b353211700 LibWeb: Update spec comment with latest changes 2025-03-01 12:41:35 +00:00
stelar7
b43bb2429a LibWeb: Rename ConnectionQueue to RequestList 2025-01-14 23:46:09 +01:00
stelar7
73272d92f0 LibWeb: Implement IDBKeyRange 2025-01-14 23:46:09 +01:00
stelar7
596f1d8426 LibWeb: Move IDBDatabase::close out of line 2025-01-14 23:46:09 +01:00
stelar7
47b8a015a7 LibWeb: Turn IDB internal Key into a GC type 2025-01-14 23:46:09 +01:00
stelar7
0b1c7d6af2 LibWeb: Mark open request as processed if the spec forgot 2024-12-14 23:02:59 +01:00
stelar7
32e5fb4da5 LibWeb: Add missing spec comment for method 2024-12-14 23:02:59 +01:00
stelar7
a25bba27fa LibWeb: Close the database if the upgrade connection is aborted 2024-12-14 23:02:59 +01:00
stelar7
0b8f2a8b81 LibWeb: Implement wait step for IndexedDB upgrade_a_database 2024-12-14 23:02:59 +01:00
stelar7
7c3f44282d LibWeb: Implement IDBTransaction::abort 2024-12-14 23:02:59 +01:00
stelar7
2954278e37 LibWeb: Implement abort_a_transaction for IndexedDB 2024-12-14 23:02:59 +01:00
stelar7
609f7aa659 LibWeb: Implement IDBFactory::delete_database 2024-12-14 23:02:59 +01:00
stelar7
452506964c LibWeb: Add const qualifiers to Vector iteration in IndexedDB 2024-12-14 23:02:59 +01:00
stelar7
0327541999 LibWeb: Implement delete_a_database for IndexedDB 2024-12-14 23:02:59 +01:00
Andrew Kaster
6ed2bf2bb1 LibWeb: Mark local variables captured in GC functions as ignored
These variables are all captured in queued events or other event loop
tasks, but are all guarded by event loop spins later in the function.

The IGNORE_USE_IN_ESCAPING_LAMBDA will soon be required for all locals
that are captured by ref in GC::Function as well as AK::Function.
2024-12-10 07:13:00 +01:00