Skip to content

Commit

Permalink
chore: cleanup remaining internals.future code (denoland#25624)
Browse files Browse the repository at this point in the history
  • Loading branch information
iuioiua authored Sep 15, 2024
1 parent a666c8c commit e4ea9be
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 64 deletions.
8 changes: 0 additions & 8 deletions runtime/js/40_fs_events.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const {
ObjectPrototypeIsPrototypeOf,
PromiseResolve,
SymbolAsyncIterator,
ObjectDefineProperty,
} = primordials;

import { SymbolDispose } from "ext:deno_web/00_infra.js";
Expand All @@ -21,13 +20,6 @@ class FsWatcher {
#promise;

constructor(paths, options) {
if (internals.future) {
ObjectDefineProperty(this, "rid", {
__proto__: null,
enumerable: false,
value: undefined,
});
}
const { recursive } = options;
this.#rid = op_fs_events_open({ recursive, paths });
}
Expand Down
1 change: 0 additions & 1 deletion runtime/js/98_global_scope_window.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ const mainRuntimeGlobalProperties = {
Location: location.locationConstructorDescriptor,
location: location.locationDescriptor,
Window: globalInterfaces.windowConstructorDescriptor,
window: core.propGetterOnly(() => globalThis),
self: core.propGetterOnly(() => globalThis),
Navigator: core.propNonEnumerable(Navigator),
navigator: core.propGetterOnly(() => navigator),
Expand Down
13 changes: 0 additions & 13 deletions runtime/js/99_main.js
Original file line number Diff line number Diff line change
Expand Up @@ -641,11 +641,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
});
}

// TODO(iuioiua): remove in Deno v2. This allows us to dynamically delete
// class properties within constructors for classes that are not defined
// within the Deno namespace.
internals.future = true;

removeImportedOps();

performance.setTimeOrigin(DateNow());
Expand Down Expand Up @@ -834,9 +829,6 @@ function bootstrapMainRuntime(runtimeOptions, warmup = false) {
nodeDebug,
});
}
if (internals.future) {
delete globalThis.window;
}
} else {
// Warmup
}
Expand Down Expand Up @@ -865,11 +857,6 @@ function bootstrapWorkerRuntime(
7: nodeDebug,
} = runtimeOptions;

// TODO(iuioiua): remove in Deno v2. This allows us to dynamically delete
// class properties within constructors for classes that are not defined
// within the Deno namespace.
internals.future = true;

performance.setTimeOrigin(DateNow());
globalThis_ = globalThis;

Expand Down
5 changes: 0 additions & 5 deletions tests/integration/run_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3318,11 +3318,6 @@ itest!(import_attributes_type_check {
exit_code: 1,
});

itest!(delete_window {
args: "run run/delete_window.js",
output_str: Some("true\n"),
});

itest!(colors_without_global_this {
args: "run run/colors_without_globalThis.js",
output_str: Some("true\n"),
Expand Down
1 change: 0 additions & 1 deletion tests/node_compat/polyfill_globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ globalThis.performance = performance;
globalThis.setImmediate = setImmediate;
globalThis.setInterval = setInterval;
globalThis.setTimeout = setTimeout;
delete globalThis.window;
12 changes: 0 additions & 12 deletions tests/specs/future/runtime_api/__test__.jsonc

This file was deleted.

15 changes: 0 additions & 15 deletions tests/specs/future/runtime_api/main.js

This file was deleted.

2 changes: 0 additions & 2 deletions tests/specs/future/runtime_api/main.out

This file was deleted.

5 changes: 0 additions & 5 deletions tests/specs/future/runtime_api/worker.js

This file was deleted.

1 change: 0 additions & 1 deletion tests/testdata/run/delete_window.js

This file was deleted.

2 changes: 1 addition & 1 deletion tools/lint.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async function ensureNoNewITests() {
"pm_tests.rs": 0,
"publish_tests.rs": 0,
"repl_tests.rs": 0,
"run_tests.rs": 336,
"run_tests.rs": 335,
"shared_library_tests.rs": 0,
"task_tests.rs": 4,
"test_tests.rs": 74,
Expand Down

0 comments on commit e4ea9be

Please sign in to comment.