archives

« Bugzilla Issues Index

#1704 — Failing tests when Object.prototype is not in the proto-chain of the global object


This is a kind of follow-up from bug 1600. I've removed Object.prototype from the prototype chain of the global object and re-ran the test suite. The following tests did not complete successfully:

S13.2.2_A19_T7
S15.1.2.1_A4.5
S15.1.2.2_A9.5
S15.1.2.3_A7.5
S15.1.2.4_A2.5
S15.1.2.5_A2.5
S15.1.3.1_A5.5
S15.1.3.2_A5.5
S15.1.3.3_A5.5
S15.1.3.4_A5.5
15.2.3.14-6-6
15.2.3.2-2-30
15.2.3.6-4-354-13
15.2.3.6-4-354-4
15.2.3.6-4-45
15.2.3.6-4-531-13
15.2.3.6-4-531-17
15.2.3.6-4-531-4
15.2.3.6-4-531-8
15.2.3.6-4-538-3
15.2.3.6-4-538-7
15.2.3.6-4-625gs
15.2.3.7-6-a-24

Most of the time this happens because `hasOwnProperty()` or `propertyIsEnumerable` is called on the global object. But without `Object.prototype` being present in the global object's proto-chain, trying to call these functions fails at runtime.

Applying the obvious workarounds should fix these problems, that means using something like `Object.prototype.hasOwnProperty.call(globalObject, 'property-name')`.