Browse Source

Fix function property order (#2305)

This Pull Request changes the following:

- Fix function property order
pull/2311/head
raskad 2 years ago
parent
commit
0213f9f1e5
  1. 12
      boa_engine/src/vm/code_block.rs

12
boa_engine/src/vm/code_block.rs

@ -538,17 +538,17 @@ pub(crate) fn create_function_object(
.configurable(false) .configurable(false)
.build(); .build();
constructor
.define_property_or_throw("length", length_property, context)
.expect("failed to define the length property of the function");
constructor
.define_property_or_throw("name", name_property, context)
.expect("failed to define the name property of the function");
if !r#async { if !r#async {
constructor constructor
.define_property_or_throw("prototype", prototype_property, context) .define_property_or_throw("prototype", prototype_property, context)
.expect("failed to define the prototype property of the function"); .expect("failed to define the prototype property of the function");
} }
constructor
.define_property_or_throw("name", name_property, context)
.expect("failed to define the name property of the function");
constructor
.define_property_or_throw("length", length_property, context)
.expect("failed to define the length property of the function");
constructor constructor
} }

Loading…
Cancel
Save