summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
Diffstat (limited to 'runtime')
-rw-r--r--runtime/examples/hello_runtime.rs1
-rw-r--r--runtime/js/99_main.js7
-rw-r--r--runtime/worker.rs1
-rw-r--r--runtime/worker_bootstrap.rs2
4 files changed, 9 insertions, 2 deletions
diff --git a/runtime/examples/hello_runtime.rs b/runtime/examples/hello_runtime.rs
index d941cdd05..de5c2427d 100644
--- a/runtime/examples/hello_runtime.rs
+++ b/runtime/examples/hello_runtime.rs
@@ -39,6 +39,7 @@ async fn main() -> Result<(), AnyError> {
ts_version: "x".to_string(),
unstable: false,
user_agent: "hello_runtime".to_string(),
+ inspect: false,
},
extensions: vec![],
unsafely_ignore_certificate_errors: None,
diff --git a/runtime/js/99_main.js b/runtime/js/99_main.js
index b25022a08..27dc7111a 100644
--- a/runtime/js/99_main.js
+++ b/runtime/js/99_main.js
@@ -648,6 +648,7 @@ delete Intl.v8BreakIterator;
ppid,
unstableFlag,
cpuCount,
+ inspectFlag,
userAgent: userAgentInfo,
} = runtimeOptions;
@@ -679,8 +680,10 @@ delete Intl.v8BreakIterator;
ObjectDefineProperties(globalThis, mainRuntimeGlobalProperties);
ObjectSetPrototypeOf(globalThis, Window.prototype);
- const consoleFromDeno = globalThis.console;
- wrapConsole(consoleFromDeno, consoleFromV8);
+ if (inspectFlag) {
+ const consoleFromDeno = globalThis.console;
+ wrapConsole(consoleFromDeno, consoleFromV8);
+ }
eventTarget.setEventTargetData(globalThis);
diff --git a/runtime/worker.rs b/runtime/worker.rs
index bce30b88e..82b6a589e 100644
--- a/runtime/worker.rs
+++ b/runtime/worker.rs
@@ -511,6 +511,7 @@ mod tests {
ts_version: "x".to_string(),
unstable: false,
user_agent: "x".to_string(),
+ inspect: false,
},
extensions: vec![],
unsafely_ignore_certificate_errors: None,
diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs
index 68f223be5..31e7c4382 100644
--- a/runtime/worker_bootstrap.rs
+++ b/runtime/worker_bootstrap.rs
@@ -21,6 +21,7 @@ pub struct BootstrapOptions {
pub ts_version: String,
pub unstable: bool,
pub user_agent: String,
+ pub inspect: bool,
}
impl BootstrapOptions {
@@ -44,6 +45,7 @@ impl BootstrapOptions {
"target": env!("TARGET"),
"v8Version": deno_core::v8_version(),
"userAgent": self.user_agent,
+ "inspectFlag": self.inspect,
});
serde_json::to_string_pretty(&payload).unwrap()
}