From 515a34b4de222e35c7ade1b92614d746e73d4c2e Mon Sep 17 00:00:00 2001 From: Kenta Moriuchi Date: Thu, 11 Jan 2024 07:37:25 +0900 Subject: refactor: use `core.ensureFastOps()` (#21888) --- runtime/js/13_buffer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/js/13_buffer.js') 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 -- cgit v1.2.3