archives

« Bugzilla Issues Index

#2335 — 19.2.1.1, 25.2.1.1: Add HasOwnProperty() check for "name"


19.2.1.1, step 22 and 25.2.1.1, step 22:

Change from:
> 22. SetFunctionName(F, "anonymous").

To:
> 22. Let hasNameProperty be the result of HasOwnProperty(F, "name").
> 23. ReturnIfAbrupt(hasNameProperty).
> 24. If hasNameProperty is false, then
> a. SetFunctionName(F, "anonymous").

(Or just move the complete check to the callee and remove the checks from the various call sites?)


Test case:
class Fn extends Function {
constructor(...args){
Object.mixin(this, {name: "awd"});
super(...args);
}
}
new Fn("");


fixed in rev23 editor's draft


fixed in rev23 draft