Closed Bug 425034 Opened 16 years ago Closed 13 years ago

Treehydra: Fix enumerator support

Categories

(Developer Infrastructure :: Source Code Analysis, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dmandelin, Assigned: dmandelin)

References

Details

Attachments

(1 file, 2 obsolete files)

Enumerators work inconsistently in Treehydra. The problem is that the lazy property resolve function will produce an error the second time it is called, even though the property being resolved may actually be available further up the prototype chain.

The ideal fix would be one where the object throws an error if and only if a property that does not exist on any level of the prototype chain is asked for.
Attached patch Proposed patch (obsolete) — Splinter Review
Admittedly this is sort of hacky, but I think it works well and is the best we can do for now. A fix to bug 425066 will hopefully allow this to be simplified and definitively solve the problem.
Attached patch Revised patch (obsolete) — Splinter Review
I left a line of debugging code in the previous patch.
Attachment #311658 - Attachment is obsolete: true
Dave,
how about this?
I think it's a little shorter and leaves room for further special-casing in the JS file if need be.
Attachment #311665 - Attachment is obsolete: true
Committed my revised patch. Will wait on bug 425066 before closing this
Depends on: 425066
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: Core → Firefox Build System
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: