Skip to main content

arr_for_each

Function arr_for_each 

Source
pub(crate) fn arr_for_each(
    it: &mut Interp,
    t: Value,
    a: &[Value],
) -> Result<Value, Value>
Expand description

Array.prototype.forEach は仕様上ジェネリックメソッドだが、以前は this_itemsObjKind::Array 以外は無条件で空 Vec)を直接使っていたため、.call(arrayLikeObj, fn)arguments/NodeList 等への定番イディオム)が何も反復しない静かな破壊 バグだった(join/slice/concat で修正済みの同型バグ)。