refactor: pull 'core', 'internals', 'primordials' from ES module (#21462)

This commit refactors how we access "core", "internals" and
"primordials" objects coming from `deno_core`, in our internal JavaScript code.

Instead of capturing them from "globalThis.__bootstrap" namespace, we
import them from recently added "ext:core/mod.js" file.
This commit is contained in:
Bartek Iwańczuk 2023-12-07 14:21:01 +01:00 committed by GitHub
parent 5dd9b26155
commit c1fc7b2cd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
71 changed files with 72 additions and 126 deletions

View file

@ -9,11 +9,10 @@
/// <reference path="../web/lib.deno_web.d.ts" />
/// <reference lib="esnext" />
const core = globalThis.Deno.core;
import { core, primordials } from "ext:core/mod.js";
const ops = core.ops;
import * as webidl from "ext:deno_webidl/00_webidl.js";
import { createFilteredInspectProxy } from "ext:deno_console/01_console.js";
const primordials = globalThis.__bootstrap.primordials;
const {
DataViewPrototypeGetBuffer,
DataViewPrototypeGetByteLength,