Skip to content

Commit

Permalink
Update WASMI branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ark0f committed Jul 17, 2023
1 parent 89bb4ff commit 77a0bc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sandbox/host/src/sandbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ impl SandboxInstance {
match &self.backend_instance {
BackendInstance::Wasmi {
exports, globals, ..
} => wasmi_set_global(exports, globals.clone(), name, value),
} => wasmi_set_global(exports, globals, name, value),

#[cfg(feature = "host-sandbox")]
BackendInstance::Wasmer(wasmer_instance) => {
Expand Down
3 changes: 2 additions & 1 deletion sandbox/host/src/sandbox/wasmi_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ thread_local! {
static WASMI_CALLER: RefCell<Option<wasmi::Caller<'static, ()>>> = RefCell::new(None);
}

#[must_use]
struct WasmiCallerSetter(());

impl WasmiCallerSetter {
Expand Down Expand Up @@ -481,7 +482,7 @@ pub fn get_global(exports: &Exports, globals: &Globals, name: &str) -> Option<Va
/// Set global value by name
pub fn set_global(
exports: &Exports,
mut globals: Globals,
globals: &Globals,
name: &str,
value: Value,
) -> std::result::Result<Option<()>, error::Error> {
Expand Down

0 comments on commit 77a0bc7

Please sign in to comment.