diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-07 14:21:01 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-07 14:21:01 +0100 |
commit | c1fc7b2cd511ce83566f696c8880d6718e5c6885 (patch) | |
tree | 6430faa4996b1022c0e1ae1e78cb3b9e196029eb /ext/websocket | |
parent | 5dd9b26155ceed514364f92fe4fdacb6b8cc8182 (diff) |
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.
Diffstat (limited to 'ext/websocket')
-rw-r--r-- | ext/websocket/01_websocket.js | 3 | ||||
-rw-r--r-- | ext/websocket/02_websocketstream.js | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/ext/websocket/01_websocket.js b/ext/websocket/01_websocket.js index a4e6b71a3..477f93b93 100644 --- a/ext/websocket/01_websocket.js +++ b/ext/websocket/01_websocket.js @@ -2,7 +2,7 @@ /// <reference path="../../core/internal.d.ts" /> -const core = globalThis.Deno.core; +import { core, primordials } from "ext:core/mod.js"; import { URL } from "ext:deno_url/00_url.js"; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { createFilteredInspectProxy } from "ext:deno_console/01_console.js"; @@ -20,7 +20,6 @@ import { } from "ext:deno_web/02_event.js"; import { Blob, BlobPrototype } from "ext:deno_web/09_file.js"; import { getLocationHref } from "ext:deno_web/12_location.js"; -const primordials = globalThis.__bootstrap.primordials; const { ArrayBufferPrototype, ArrayBufferIsView, diff --git a/ext/websocket/02_websocketstream.js b/ext/websocket/02_websocketstream.js index ff24a72af..16346e73b 100644 --- a/ext/websocket/02_websocketstream.js +++ b/ext/websocket/02_websocketstream.js @@ -2,7 +2,7 @@ /// <reference path="../../core/internal.d.ts" /> -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"; @@ -14,7 +14,6 @@ import { headerListFromHeaders, headersFromHeaderList, } from "ext:deno_fetch/20_headers.js"; -const primordials = globalThis.__bootstrap.primordials; const { ArrayPrototypeJoin, ArrayPrototypeMap, |