Closed Bug 1229293 Opened 9 years ago Closed 9 years ago

Forbid HierarchicalStringList.__setattr__

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file)

We have multiple cases of things like this in the tree: RESOURCE_FILES.html = [ 'folder.png', ] This totally overrides all type checking, starting with enforcing order on the list (see intl/unicharutil/tables/moz.build for example)
Actually, it's not so much of a problem, what *is* a problem is the lack of order enforcement on the StrictOrderingOnAppendList that HierarchicalStringList contain, and the fact that it's possible to overwrite a FOO.foo.
The current implementation of HierarchicalStringList allows the following: FOO.bar = [ 'foo', 'bar', ] while FOO.bar += [ 'foo', 'bar', ] would be invalid because of the StrictOrderingOnAppendList enforcement. It also allows to overwrite the entire list with a subsequent FOO.bar = [ 'baz', ] while we've explicitly forbidden such things for every other list. While in the vicinity, fix HierarchicalStringList._get_export_variable to not call the HierarchicalStringList constructor uselessly.
Attachment #8694093 - Flags: review?(gps)
Attachment #8694093 - Flags: review?(gps) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: