summaryrefslogtreecommitdiff
path: root/ext/web/00_infra.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2024-01-11 07:37:25 +0900
committerGitHub <noreply@github.com>2024-01-10 15:37:25 -0700
commit515a34b4de222e35c7ade1b92614d746e73d4c2e (patch)
tree8284201fc826a33f12597959a8a8be14e0f524bd /ext/web/00_infra.js
parentd4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff)
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'ext/web/00_infra.js')
-rw-r--r--ext/web/00_infra.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/ext/web/00_infra.js b/ext/web/00_infra.js
index 9dc3a0c37..da6fe0f88 100644
--- a/ext/web/00_infra.js
+++ b/ext/web/00_infra.js
@@ -7,7 +7,10 @@
/// <reference path="../web/lib.deno_web.d.ts" />
import { core, internals, primordials } from "ext:core/mod.js";
-const ops = core.ops;
+const {
+ op_base64_encode,
+ op_base64_decode,
+} = core.ensureFastOps();
const {
ArrayPrototypeJoin,
ArrayPrototypeMap,
@@ -33,6 +36,7 @@ const {
Symbol,
TypeError,
} = primordials;
+
import { URLPrototype } from "ext:deno_url/00_url.js";
const ASCII_DIGIT = ["\u0030-\u0039"];
@@ -245,7 +249,7 @@ function collectHttpQuotedString(input, position, extractValue) {
* @returns {string}
*/
function forgivingBase64Encode(data) {
- return ops.op_base64_encode(data);
+ return op_base64_encode(data);
}
/**
@@ -253,7 +257,7 @@ function forgivingBase64Encode(data) {
* @returns {Uint8Array}
*/
function forgivingBase64Decode(data) {
- return ops.op_base64_decode(data);
+ return op_base64_decode(data);
}
// Taken from std/encoding/base64url.ts