« Bugzilla Issues Index

#1547 — Use DefinePropertyOrThrow in step 6f

Using DefinePropertyOrThrow saves the overhead of testing [[DefineOwnProperty]]'s return value and throwing a TypeError in step 6f.

Can't use DefinePropertyOrThrow here because the the [[Enumerable]] attribute must be set to false which is not the default value that DPOT sets.

There should be any actual runtime overhead difference as the error cases are the same regardless of the formulation in the spec.

DefinePropertyOrThrow does not set any property attribute, did you mean CreateOwnDataProperty? (Or did DefinePropertyOrThrow change in your current draft compared to re15?)

Duh, you're right. I was thinking CreateOwnProperty because that's literally what is happening there.

DefinePropertyOrThrow would be ok there. It doesn't really make any difference, but I agree that it reads a little better that way so I'll make the change.

In Rev 16 editor's draft