Revert "Allow overwriting virtual properties via setting `set` to `None`."
This reverts commit 0a8adfca6e5fce8835552c1c7aba063649ba3aeb.
This commit is contained in:
parent
59dc35b8a4
commit
4709d2d0b4
|
@ -63,16 +63,9 @@ impl<'gc> Property<'gc> {
|
||||||
new_value: Value<'gc>,
|
new_value: Value<'gc>,
|
||||||
) {
|
) {
|
||||||
match self {
|
match self {
|
||||||
Property::Virtual {
|
Property::Virtual { set, .. } => {
|
||||||
set, attributes, ..
|
|
||||||
} => {
|
|
||||||
if let Some(function) = set {
|
if let Some(function) = set {
|
||||||
function(avm, context, this, &[new_value]);
|
function(avm, context, this, &[new_value]);
|
||||||
} else if !attributes.contains(ReadOnly) {
|
|
||||||
*self = Property::Stored {
|
|
||||||
value: new_value,
|
|
||||||
attributes: *attributes,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Property::Stored {
|
Property::Stored {
|
||||||
|
|
Loading…
Reference in New Issue