Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions core/src/avm1/globals/as_broadcaster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ pub fn create_class<'gc>(
// returned in such cases.
let class = context.empty_class(super_proto);

class.constr.set_attributes(
context.gc(),
None,
Attribute::DONT_ENUM | Attribute::DONT_DELETE | Attribute::VERSION_6,
Attribute::empty(),
);

let mut define_as_object = |index: usize| -> Object<'gc> {
match OBJECT_DECLS[index].define_on(context.strings, class.constr, context.fn_proto) {
Value::Object(o) => o,
Expand Down
16 changes: 15 additions & 1 deletion core/src/avm1/globals/text_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::avm1::error::Error;
use crate::avm1::globals::bitmap_filter;
use crate::avm1::object::NativeObject;
use crate::avm1::property_decl::{DeclContext, Declaration, SystemClass};
use crate::avm1::{globals, ArrayBuilder, Object, Value};
use crate::avm1::{globals, ArrayBuilder, Attribute, Object, Value};
use crate::display_object::{
AutoSizeMode, EditText, TDisplayObject, TInteractiveObject, TextSelection,
};
Expand Down Expand Up @@ -106,6 +106,20 @@ pub fn create_class<'gc>(
) -> SystemClass<'gc> {
let class = context.empty_class(super_proto);
context.define_properties_on(class.proto, PROTO_DECLS);

class.constr.set_attributes(
context.gc(),
None,
Attribute::DONT_ENUM | Attribute::DONT_DELETE | Attribute::VERSION_6,
Attribute::empty(),
);
class.proto.set_attributes(
context.gc(),
None,
Attribute::DONT_ENUM | Attribute::DONT_DELETE | Attribute::VERSION_6,
Attribute::empty(),
);

class
}

Expand Down
1 change: 0 additions & 1 deletion tests/tests/swfs/avm1/globals_swf5/test.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
num_ticks = 1
known_failure = true
Loading