Skip to content
This repository has been archived by the owner on Nov 26, 2024. It is now read-only.

Commit

Permalink
stub-out js_finalizeref in arbitrator
Browse files Browse the repository at this point in the history
  • Loading branch information
tsahee authored and joshuacolvin0 committed Oct 6, 2023
1 parent c425ed1 commit 0a30896
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions arbitrator/wasm-libraries/go-stub/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,17 +618,13 @@ pub unsafe extern "C" fn go__syscall_js_valueIndex(sp: usize) {
}

/// Safety: λ(v value)
/// TODO: reference counting
#[no_mangle]
pub unsafe extern "C" fn go__syscall_js_finalizeRef(sp: usize) {
let mut sp = GoStack::new(sp);
let val = JsValue::new(sp.read_u64());
match val {
JsValue::Ref(x) if x < DYNAMIC_OBJECT_ID_BASE => {}
JsValue::Ref(x) => {
if DynamicObjectPool::singleton().remove(x).is_none() {
eprintln!("Go attempting to finalize unknown ref {}", x);
}
}
JsValue::Ref(_) => {}
val => eprintln!("Go attempting to finalize {:?}", val),
}
}
Expand Down

0 comments on commit 0a30896

Please sign in to comment.