Skip to content

storage: Simplify layout of storage crate#40124

Merged
yezhizhen merged 1 commit intoservo:mainfrom
arihant2math:storage-layout-simplification
Oct 24, 2025
Merged

storage: Simplify layout of storage crate#40124
yezhizhen merged 1 commit intoservo:mainfrom
arihant2math:storage-layout-simplification

Conversation

@arihant2math
Copy link
Copy Markdown
Contributor

@arihant2math arihant2math commented Oct 24, 2025

Due to old design choices, we had the layout of:

| - storage
|    - indexeddb
|        - mod.rs
|        - idb_thread.rs
|        - engines/
|    - webstorage
|        - mod.rs
|        - webstorage_thread.rs
|        - engines/

I merged the *_thread file into mod.rs, since mod.rs is pretty empty. This should be a better layout for when more threads are introduced.

Testing: Refactor, none needed

@arihant2math arihant2math force-pushed the storage-layout-simplification branch from 018a29f to e829ea0 Compare October 24, 2025 04:05
@arihant2math arihant2math force-pushed the storage-layout-simplification branch from e829ea0 to e64d029 Compare October 24, 2025 04:05
@arihant2math arihant2math marked this pull request as ready for review October 24, 2025 04:05
@servo-highfive servo-highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 24, 2025
@servo-highfive servo-highfive removed the S-awaiting-review There is new code that needs to be reviewed. label Oct 24, 2025
@yezhizhen
Copy link
Copy Markdown
Member

I merged the *_thread file into mod.rs, since mod.rs is pretty empty. This should be a better layout for when more threads are introduced.

Can you elaborate why?

@arihant2math
Copy link
Copy Markdown
Contributor Author

mod.rs was only going to be used for mod declarations and re-exporting idb_thread::IndexedDBThreadFactory and internal engine stuff wanted access to idb_thread so I figured it's probably cleaner to remove the file entirely. Since indexeddb and webstorage aren't exposed publicly this doesn't really change much on that front so I figured this would reduce some of the path complexity.

@yezhizhen yezhizhen added this pull request to the merge queue Oct 24, 2025
@servo-highfive servo-highfive added the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 24, 2025
Merged via the queue into servo:main with commit 025abc8 Oct 24, 2025
33 checks passed
@servo-highfive servo-highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Oct 24, 2025
@arihant2math arihant2math deleted the storage-layout-simplification branch October 24, 2025 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants