summaryrefslogtreecommitdiff
path: root/runtime/js
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2023-04-28 00:37:03 +0200
committerGitHub <noreply@github.com>2023-04-28 00:37:03 +0200
commit683dbd7f3bdd91c33005b816ad26b82a4343931a (patch)
tree64c6dd9a572e573040022b22575a1043add84fd0 /runtime/js
parent504482dadd4d8cd9e4105d56ed86802906767f39 (diff)
Revert "refactor: don't expose Deno[Deno.internal].core namespace" (#18881)
Also conditionally disabled one test if there's not enough space on device.
Diffstat (limited to 'runtime/js')
-rw-r--r--runtime/js/99_main.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 914940f5c..fa16cc1f4 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -391,6 +391,12 @@ function promiseRejectMacrotaskCallback() {
let hasBootstrapped = false;
// Set up global properties shared by main and worker runtime.
ObjectDefineProperties(globalThis, windowOrWorkerGlobalScope);
+// FIXME(bartlomieju): temporarily add whole `Deno.core` to
+// `Deno[Deno.internal]` namespace. It should be removed and only necessary
+// methods should be left there.
+ObjectAssign(internals, {
+ core,
+});
const internalSymbol = Symbol("Deno.internal");
const finalDenoNs = {
internal: internalSymbol,
@@ -422,7 +428,7 @@ function bootstrapMainRuntime(runtimeOptions) {
13: v8Version,
14: userAgent,
15: inspectFlag,
- 16: enableTestingFeaturesFlag,
+ // 16: enableTestingFeaturesFlag
} = runtimeOptions;
performance.setTimeOrigin(DateNow());
@@ -497,12 +503,6 @@ function bootstrapMainRuntime(runtimeOptions) {
ObjectAssign(finalDenoNs, denoNsUnstable);
}
- // Add `Deno[Deno.internal].core` namespace if
- // `--enable-testing-features-do-not-use` flag is set.
- if (enableTestingFeaturesFlag) {
- ObjectAssign(internals, { core });
- }
-
// Setup `Deno` global - we're actually overriding already existing global
// `Deno` with `Deno` namespace from "./deno.ts".
ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));
@@ -612,11 +612,6 @@ function bootstrapWorkerRuntime(
noColor: util.readOnly(noColor),
args: util.readOnly(ObjectFreeze(args)),
});
- // Add `Deno[Deno.internal].core` namespace if
- // `--enable-testing-features-do-not-use` flag is set.
- if (enableTestingFeaturesFlag) {
- ObjectAssign(internals, { core });
- }
// Setup `Deno` global - we're actually overriding already
// existing global `Deno` with `Deno` namespace from "./deno.ts".
ObjectDefineProperty(globalThis, "Deno", util.readOnly(finalDenoNs));