+59
−5
Loading
Bug 1733075 part 2 - Optimize enumeration with no enumerable properties on the proto chain better. r=iain Add a fast path to better optimize the common case where the proto chain has no enumerable properties. The advantages of this are: * We no longer have to iterate over all the properties on the proto chain. * We don't need to check for duplicates (this involves a relatively slow HashSet and includes non-enumerable properties too). ProtoMayHaveEnumerableProperties returns false (meaning the fast path works) in 97-100% of cases on typical web workloads. Differential Revision: https://phabricator.services.mozilla.com/D127055