summaryrefslogtreecommitdiff
path: root/ext/webstorage/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-03-03 19:04:10 +0530
committerGitHub <noreply@github.com>2023-03-03 19:04:10 +0530
commit38555a6a0fe9a7235776afe0ebfb2a24dc518391 (patch)
treeef9506c500451e5f2ef4ae5b70eda85c7147a25e /ext/webstorage/lib.rs
parent64503fabd81e38c58d44d23ae94f5b87a384b86e (diff)
feat(ops): reland fast zero copy string arguments (#17996)
Reland https://github.com/denoland/deno/pull/16777 The codegen is disabled in async ops and when fallback to slow call is possible (return type is a Result) to avoid hitting this V8 bug: https://github.com/denoland/deno/issues/17159
Diffstat (limited to 'ext/webstorage/lib.rs')
-rw-r--r--ext/webstorage/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/webstorage/lib.rs b/ext/webstorage/lib.rs
index 852ce229e..5e534a122 100644
--- a/ext/webstorage/lib.rs
+++ b/ext/webstorage/lib.rs
@@ -138,8 +138,8 @@ pub fn op_webstorage_key(
#[op]
pub fn op_webstorage_set(
state: &mut OpState,
- key: String,
- value: String,
+ key: &str,
+ value: &str,
persistent: bool,
) -> Result<(), AnyError> {
let conn = get_webstorage(state, persistent)?;
@@ -183,7 +183,7 @@ pub fn op_webstorage_get(
#[op]
pub fn op_webstorage_remove(
state: &mut OpState,
- key_name: String,
+ key_name: &str,
persistent: bool,
) -> Result<(), AnyError> {
let conn = get_webstorage(state, persistent)?;