mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-12 08:31:21 +00:00
Merge branch 'master' into fix/doc-comment-runtimeerror
This commit is contained in:
@ -54,6 +54,7 @@ impl IsExport for Export {
|
||||
/// n
|
||||
/// }
|
||||
/// ```
|
||||
#[derive(Clone)]
|
||||
pub struct ImportObject {
|
||||
map: Arc<Mutex<HashMap<String, Box<dyn LikeNamespace + Send>>>>,
|
||||
pub(crate) state_creator:
|
||||
@ -158,15 +159,6 @@ impl ImportObject {
|
||||
.and_then(|ns| f(ns))
|
||||
}
|
||||
|
||||
/// Create a clone ref of this namespace.
|
||||
pub fn clone_ref(&self) -> Self {
|
||||
Self {
|
||||
map: Arc::clone(&self.map),
|
||||
state_creator: self.state_creator.clone(),
|
||||
allow_missing_functions: false,
|
||||
}
|
||||
}
|
||||
|
||||
fn get_objects(&self) -> VecDeque<(String, String, Export)> {
|
||||
let mut out = VecDeque::new();
|
||||
let guard = self.map.lock().unwrap();
|
||||
|
@ -103,7 +103,7 @@ impl Instance {
|
||||
module,
|
||||
inner,
|
||||
exports,
|
||||
import_object: imports.clone_ref(),
|
||||
import_object: imports.clone(),
|
||||
};
|
||||
|
||||
if let Some(start_index) = instance.module.info.start_func {
|
||||
|
Reference in New Issue
Block a user