summaryrefslogtreecommitdiff
path: root/ext/node/global.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-06-12 22:32:54 +0530
committerGitHub <noreply@github.com>2024-06-12 22:32:54 +0530
commit1d290ccc2a39d355aa0e43e86f5f4ce09a0bd655 (patch)
tree3d7e22728380f690135d5c3921b2828c0862b59b /ext/node/global.rs
parent85e9a790c9873a042d22eb4cea24d195fd27334f (diff)
fix(ext/node): fix vm memory usage and context initialization (#23976)
Fixes https://github.com/denoland/deno/issues/22441 Fixes https://github.com/denoland/deno/issues/23913 Fixes https://github.com/denoland/deno/issues/23852 Fixes https://github.com/denoland/deno/issues/23917
Diffstat (limited to 'ext/node/global.rs')
-rw-r--r--ext/node/global.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/global.rs b/ext/node/global.rs
index 5c95b2f8f..e01fca95e 100644
--- a/ext/node/global.rs
+++ b/ext/node/global.rs
@@ -275,7 +275,7 @@ fn current_mode(scope: &mut v8::HandleScope) -> Mode {
};
let mut buffer = [MaybeUninit::uninit(); 2048];
let str = v8_string.to_rust_cow_lossy(scope, &mut buffer);
- if node_resolver.in_npm_package_with_cache(str) {
+ if str.starts_with("node:") || node_resolver.in_npm_package_with_cache(str) {
Mode::Node
} else {
Mode::Deno