Closed Bug 1799287 Opened 1 year ago Closed 1 year ago

Order of Function properties

Categories

(Core :: JavaScript Engine, defect)

Firefox 107
defect

Tracking

()

RESOLVED DUPLICATE of bug 1629803

People

(Reporter: f52985, Unassigned)

Details

Steps to reproduce:

Execute the program below using jsshell

function f(){}
console.log(Object.getOwnPropertyNames(f));

Actual results:

"prototype,length,name"

is printed.

Expected results:

"length,name,prototype"

should be printed.

According to the ECMA-262 Specification, the algorithm DefinePropertyOrThrow is called with arguments "length", "name", and "prototype" in this order, so this order should be preserved when listing the properties with Object.getOwnPropertyNames.

Thanks for the report. If we fix this it would probably be part of bug 1629803.

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1629803
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.