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 /runtime/js/13_buffer.js | |
| parent | d4893eb51a01c5a692d8ca74a3b8ff95c5fd1d9f (diff) | |
refactor: use `core.ensureFastOps()` (#21888)
Diffstat (limited to 'runtime/js/13_buffer.js')
| -rw-r--r-- | runtime/js/13_buffer.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/js/13_buffer.js b/runtime/js/13_buffer.js index 0692939de..36d979e75 100644 --- a/runtime/js/13_buffer.js +++ b/runtime/js/13_buffer.js @@ -4,8 +4,7 @@ // Copyright 2009 The Go Authors. All rights reserved. BSD license. // https://github.com/golang/go/blob/master/LICENSE -import { assert } from "ext:deno_web/00_infra.js"; -const primordials = globalThis.__bootstrap.primordials; +import { primordials } from "ext:core/mod.js"; const { ArrayBufferPrototypeGetByteLength, TypedArrayPrototypeSubarray, @@ -20,6 +19,8 @@ const { Error, } = primordials; +import { assert } from "ext:deno_web/00_infra.js"; + // MIN_READ is the minimum ArrayBuffer size passed to a read call by // buffer.ReadFrom. As long as the Buffer has at least MIN_READ bytes beyond // what is required to hold the contents of r, readFrom() will not grow the |
