avm2: Add a fast path in coerce_s

This commit is contained in:
Adrian Wielgosik 2024-07-13 21:57:13 +02:00 committed by Nathan Adams
parent 131b2c21f4
commit c9fedb2cf6
1 changed files with 1 additions and 0 deletions

View File

@ -1969,6 +1969,7 @@ impl<'a, 'gc> Activation<'a, 'gc> {
let coerced = match value { let coerced = match value {
Value::Undefined | Value::Null => Value::Null, Value::Undefined | Value::Null => Value::Null,
Value::String(_) => value,
_ => value.coerce_to_string(self)?.into(), _ => value.coerce_to_string(self)?.into(),
}; };