diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-05 18:46:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-05 22:46:37 +0000 |
commit | 76b173b60c975fe7540d04aac5b7a40be67fe466 (patch) | |
tree | 0d1a58abce1b336e1e20ceeeeb7319030a3142b5 /ext/ffi/00_ffi.js | |
parent | 1ab16e2426819af2c534e8a99b98f244626de512 (diff) |
refactor: move "pathFromURL" to deno_web extension (#18037)
This API is required by several extensions like "ext/node", "ext/ffi"
and also FS APIs that we want to move to a separate crate. Because
of that "pathFromURL" API was moved to "deno_web" extension so
other extension crates can rely on it.
Diffstat (limited to 'ext/ffi/00_ffi.js')
-rw-r--r-- | ext/ffi/00_ffi.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js index a63a027e8..a1b177122 100644 --- a/ext/ffi/00_ffi.js +++ b/ext/ffi/00_ffi.js @@ -2,7 +2,6 @@ const core = globalThis.Deno.core; const ops = core.ops; -const internals = globalThis.__bootstrap.internals; const primordials = globalThis.__bootstrap.primordials; const { ArrayPrototypeMap, @@ -28,6 +27,7 @@ const { SymbolFor, WeakMap, } = primordials; +import { pathFromURL } from "internal:deno_web/00_infra.js"; const promiseIdSymbol = SymbolFor("Deno.core.internalPromiseId"); @@ -542,9 +542,6 @@ class DynamicLibrary { } function dlopen(path, symbols) { - // TODO(@crowlKats): remove me - // URL support is progressively enhanced by util in `runtime/js`. - const pathFromURL = internals.pathFromURL ?? ((p) => p); return new DynamicLibrary(pathFromURL(path), symbols); } |