Skip to content

Commit

Permalink
avm2: Ignore a missing [[TargetProperty]] when assigning an XMLList
Browse files Browse the repository at this point in the history
  • Loading branch information
evilpie authored and Lord-McSweeney committed Oct 28, 2023
1 parent 08d6a7b commit 33dde1e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
17 changes: 8 additions & 9 deletions core/src/avm2/object/xml_list_object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -743,15 +743,14 @@ impl<'gc> TObject<'gc> for XmlListObject<'gc> {
if let Some(list) =
value.as_object().and_then(|x| x.as_xml_list_object())
{
// FIXME: What if XMLList does not have a target property.
let target_property =
list.target_property().expect("Not validated yet");

if let Some(name) = target_property.local_name() {
y.set_local_name(name, activation.gc());
}
if let Some(namespace) = target_property.explict_namespace() {
y.set_namespace(namespace, activation.gc());
// Note: Don't set anything when there is no [[TargetProperty]].
if let Some(target_property) = list.target_property() {
if let Some(name) = target_property.local_name() {
y.set_local_name(name, activation.gc());
}
if let Some(namespace) = target_property.explict_namespace() {
y.set_namespace(namespace, activation.gc());
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true

0 comments on commit 33dde1e

Please sign in to comment.