summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/js/99_main.js5
-rw-r--r--runtime/worker_bootstrap.rs5
2 files changed, 10 insertions, 0 deletions
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index 965af460d..11c26798b 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -647,6 +647,7 @@ function bootstrapMainRuntime(runtimeOptions) {
6: maybeBinaryNpmCommandName,
7: shouldDisableDeprecatedApiWarning,
8: shouldUseVerboseDeprecatedApiWarning,
+ 9: future,
} = runtimeOptions;
removeImportedOps();
@@ -769,6 +770,10 @@ function bootstrapMainRuntime(runtimeOptions) {
if (nodeBootstrap) {
nodeBootstrap(hasNodeModulesDir, maybeBinaryNpmCommandName);
}
+
+ if (future) {
+ delete globalThis.window;
+ }
}
function bootstrapWorkerRuntime(
diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs
index ca2d4d8ec..300829630 100644
--- a/runtime/worker_bootstrap.rs
+++ b/runtime/worker_bootstrap.rs
@@ -62,6 +62,7 @@ pub struct BootstrapOptions {
pub node_ipc_fd: Option<i64>,
pub disable_deprecated_api_warning: bool,
pub verbose_deprecated_api_warning: bool,
+ pub future: bool,
}
impl Default for BootstrapOptions {
@@ -92,6 +93,7 @@ impl Default for BootstrapOptions {
node_ipc_fd: None,
disable_deprecated_api_warning: false,
verbose_deprecated_api_warning: false,
+ future: false,
}
}
}
@@ -125,6 +127,8 @@ struct BootstrapV8<'a>(
bool,
// verbose_deprecated_api_warning
bool,
+ // future
+ bool,
);
impl BootstrapOptions {
@@ -146,6 +150,7 @@ impl BootstrapOptions {
self.maybe_binary_npm_command_name.as_deref(),
self.disable_deprecated_api_warning,
self.verbose_deprecated_api_warning,
+ self.future,
);
bootstrap.serialize(ser).unwrap()