In non-debug builds, logical-coordinate classes should not have an mWritingMode member at all

RESOLVED FIXED in mozilla35

Status

()

defect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jfkthame, Assigned: jfkthame)

Tracking

(Blocks 1 bug)

unspecified
mozilla35
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

The intended design of the logical-coordinate geometry classes in WritingModes.h was that the mWritingMode field should only be present in debug builds, for validation by CHECK_WRITING_MODE, but in non-debug builds we'd avoid the overhead of tagging these classes with the mode.

However, the mWritingMode field was inadvertently not guarded by #ifdef DEBUG, and so it is present in all builds, even though we don't actually set it in non-debug builds.

And then we've got a couple of places where non-debug code actually refers to the mWritingMode field, which it should never do. In the LogicalSize [in]equality operators, we can't make equality depend on comparing the writing modes of the operands; rather, we need to mandate that these operators (like others) are only valid when writing modes match.
Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Attachment #8501125 - Flags: review?(smontagu) → review+
https://hg.mozilla.org/mozilla-central/rev/681c4450639e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.