Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(ext/webstorage): use object wrap for Storage #26931

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

@littledivy littledivy added the ci-draft Run the CI on draft PRs. label Nov 19, 2024
@littledivy littledivy changed the title chore(ext/webstorage): rewrite Storage in op2 object wrap chore(ext/webstorage): use object wrap for Storage Nov 23, 2024
@littledivy littledivy changed the title chore(ext/webstorage): use object wrap for Storage chore(ext/webstorage): use object wrap for Storage Nov 23, 2024
@littledivy littledivy changed the title chore(ext/webstorage): use object wrap for Storage perf(ext/webstorage): use object wrap for Storage Nov 23, 2024
ext/webstorage/lib.rs Outdated Show resolved Hide resolved
@@ -9789,7 +9789,7 @@
"event_constructor.window.html": false,
"event_initstorageevent.window.html": false,
"missing_arguments.window.html": true,
"storage_builtins.window.html": true,
"storage_builtins.window.html": false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test checks if

Storage.prototype.setItem == localStorage.setItem

but our Proxy needs to create a new instance via .bind because receiver holds cppgc object.

Comment on lines +145 to +147
#[required(1)]
#[string]
fn key(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[arguments = { required(1) }, return = string]

Comment on lines +164 to +165
#[fast]
#[required(2)]
Copy link
Member

@bartlomieju bartlomieju Nov 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#[fast, webidl = { required(2) }]

@littledivy littledivy marked this pull request as ready for review November 27, 2024 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-draft Run the CI on draft PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants