Open Bug 1372540 Opened 8 years ago Updated 1 year ago

Use newEnumerate hook instead of the enumerate hook

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: jandem, Unassigned)

References

(Blocks 2 open bugs)

Details

While working on bug 1370608 I noticed it's very common for websites to call the JSFunction enumerate hook. This ends up defining the name/length/prototype properties and especially allocating the prototype object has a lot of overhead. In almost all of these cases we're only interested in enumerable properties (the websites are probably using for-in). If we convert this hook to newEnumerate, we can just return immediately when enumerableOnly is true.
Priority: -- → P3
Severity: normal → S3
Severity: S3 → N/A
You need to log in before you can comment on or make changes to this bug.