mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-12 13:28:49 +00:00
Fixed Context references
This commit is contained in:
2
lib/api/src/sys/externals/function.rs
vendored
2
lib/api/src/sys/externals/function.rs
vendored
@@ -424,7 +424,7 @@ impl Function {
|
|||||||
}
|
}
|
||||||
if !arg.is_from_store(store) {
|
if !arg.is_from_store(store) {
|
||||||
return Err(RuntimeError::new(
|
return Err(RuntimeError::new(
|
||||||
"cross-`Context` values are not supported",
|
"cross-`Store` values are not supported",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
*slot = arg.as_raw(store);
|
*slot = arg.as_raw(store);
|
||||||
|
|||||||
4
lib/api/src/sys/externals/global.rs
vendored
4
lib/api/src/sys/externals/global.rs
vendored
@@ -61,7 +61,7 @@ impl Global {
|
|||||||
) -> Result<Self, RuntimeError> {
|
) -> Result<Self, RuntimeError> {
|
||||||
if !val.is_from_store(store) {
|
if !val.is_from_store(store) {
|
||||||
return Err(RuntimeError::new(
|
return Err(RuntimeError::new(
|
||||||
"cross-`Context` values are not supported",
|
"cross-`Store` values are not supported",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let global = VMGlobal::new(GlobalType {
|
let global = VMGlobal::new(GlobalType {
|
||||||
@@ -165,7 +165,7 @@ impl Global {
|
|||||||
pub fn set(&self, store: &mut impl AsStoreMut, val: Value) -> Result<(), RuntimeError> {
|
pub fn set(&self, store: &mut impl AsStoreMut, val: Value) -> Result<(), RuntimeError> {
|
||||||
if !val.is_from_store(store) {
|
if !val.is_from_store(store) {
|
||||||
return Err(RuntimeError::new(
|
return Err(RuntimeError::new(
|
||||||
"cross-`Context` values are not supported",
|
"cross-`Store` values are not supported",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
if self.ty(store).mutability != Mutability::Var {
|
if self.ty(store).mutability != Mutability::Var {
|
||||||
|
|||||||
2
lib/api/src/sys/externals/table.rs
vendored
2
lib/api/src/sys/externals/table.rs
vendored
@@ -156,7 +156,7 @@ impl Table {
|
|||||||
) -> Result<(), RuntimeError> {
|
) -> Result<(), RuntimeError> {
|
||||||
if dst_table.handle.store_id() != src_table.handle.store_id() {
|
if dst_table.handle.store_id() != src_table.handle.store_id() {
|
||||||
return Err(RuntimeError::new(
|
return Err(RuntimeError::new(
|
||||||
"cross-`Context` table copies are not supported",
|
"cross-`Store` table copies are not supported",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
let store = store;
|
let store = store;
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ macro_rules! impl_native_traits {
|
|||||||
// Ensure all parameters come from the same context.
|
// Ensure all parameters come from the same context.
|
||||||
if $(!FromToNativeWasmType::is_from_store(&$x, store) ||)* false {
|
if $(!FromToNativeWasmType::is_from_store(&$x, store) ||)* false {
|
||||||
return Err(RuntimeError::new(
|
return Err(RuntimeError::new(
|
||||||
"cross-`Context` values are not supported",
|
"cross-`Store` values are not supported",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
// TODO: when `const fn` related features mature more, we can declare a single array
|
// TODO: when `const fn` related features mature more, we can declare a single array
|
||||||
|
|||||||
Reference in New Issue
Block a user