fix(script): don't pass an unrooted slice to from_rooted_slice

This commit is contained in:
yvt 2021-07-28 01:39:51 +09:00
parent 110b3ab6bc
commit afbe2fa1f2

View file

@ -541,7 +541,12 @@ pub unsafe fn cross_origin_set(
*cx,
receiver,
setter_jsval.handle().into(),
&jsapi::HandleValueArray::from_rooted_slice(&[v.get()]),
// FIXME: Our binding lacks `HandleValueArray(Handle<Value>)`
// <https://searchfox.org/mozilla-central/rev/072710086ddfe25aa2962c8399fefb2304e8193b/js/public/ValueArray.h#54-55>
&jsapi::HandleValueArray {
length_: 1,
elements_: v.ptr,
},
ignored.handle_mut().into(),
) {
return false;