mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-11 12:01:21 +00:00
Correct base calculation in anyref allocator
This `base` value is the raw value coming out of the first call to `table.grow`. Throwing in the addition of `JSIDX_RESERVED` just wasn't right!
This commit is contained in:
@ -39,7 +39,7 @@ impl Slab {
|
|||||||
internal_error("table grow failure")
|
internal_error("table grow failure")
|
||||||
}
|
}
|
||||||
if self.base == 0 {
|
if self.base == 0 {
|
||||||
self.base = r as usize + (super::JSIDX_RESERVED as usize);
|
self.base = r as usize;
|
||||||
} else if self.base + self.data.len() != r as usize {
|
} else if self.base + self.data.len() != r as usize {
|
||||||
internal_error("someone else allocated table entires?")
|
internal_error("someone else allocated table entires?")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user