From 2b0f553e2e1b83ed8ff605f2ea25e2c31bb4c889 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 26 Mar 2019 11:56:34 -0400 Subject: Add deno_core::RecursiveLoad for async module loading (#2034) --- core/isolate.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'core/isolate.rs') diff --git a/core/isolate.rs b/core/isolate.rs index a8ee22d47..9145513f1 100644 --- a/core/isolate.rs +++ b/core/isolate.rs @@ -1,4 +1,9 @@ // Copyright 2018 the Deno authors. All rights reserved. MIT license. + +// Do not add dependenies to modules.rs. it should remain decoupled from the +// isolate to keep the Isolate struct from becoming too bloating for users who +// do not need asynchronous module loading. + use crate::js_errors::JSError; use crate::libdeno; use crate::libdeno::deno_buf; @@ -287,7 +292,6 @@ impl Isolate { } /// Low-level module creation. - /// You probably want to use IsolateState::mod_execute instead. pub fn mod_new( &self, main: bool, @@ -523,7 +527,7 @@ pub fn js_check(r: Result<(), JSError>) { } #[cfg(test)] -mod tests { +pub mod tests { use super::*; use std::sync::atomic::{AtomicUsize, Ordering}; -- cgit v1.2.3