diff options
author | Kenta Moriuchi <moriken@kimamass.com> | 2024-01-11 07:37:25 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 15:37:25 -0700 |
commit | 515a34b4de222e35c7ade1b92614d746e73d4c2e (patch) | |
tree | 8284201fc826a33f12597959a8a8be14e0f524bd /ext/cache | |
parent | d4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff) |
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'ext/cache')
-rw-r--r-- | ext/cache/01_cache.js | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ext/cache/01_cache.js b/ext/cache/01_cache.js index d764d0c42..541feb5c1 100644 --- a/ext/cache/01_cache.js +++ b/ext/cache/01_cache.js @@ -1,6 +1,14 @@ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license. import { core, primordials } from "ext:core/mod.js"; -import * as webidl from "ext:deno_webidl/00_webidl.js"; +const { + op_cache_delete, + op_cache_match, + op_cache_put, + op_cache_put_finish, + op_cache_storage_delete, + op_cache_storage_has, + op_cache_storage_open, +} = core.ensureFastOps(); const { ArrayPrototypePush, ObjectPrototypeIsPrototypeOf, @@ -10,6 +18,8 @@ const { SymbolFor, TypeError, } = primordials; + +import * as webidl from "ext:deno_webidl/00_webidl.js"; import { Request, RequestPrototype, @@ -19,15 +29,7 @@ import { toInnerResponse } from "ext:deno_fetch/23_response.js"; import { URLPrototype } from "ext:deno_url/00_url.js"; import { getHeader } from "ext:deno_fetch/20_headers.js"; import { readableStreamForRid } from "ext:deno_web/06_streams.js"; -const { - op_cache_delete, - op_cache_match, - op_cache_put, - op_cache_put_finish, - op_cache_storage_delete, - op_cache_storage_has, - op_cache_storage_open, -} = core.ensureFastOps(); + class CacheStorage { constructor() { webidl.illegalConstructor(); |