Closed Bug 1786284 Opened 2 years ago Closed 2 years ago

Improve handling of anomalous tables in COLR font code

Categories

(Core :: Layout: Text and Fonts, defect)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: jfkthame, Assigned: jfkthame)

References

Details

Attachments

(1 file)

In the initial COLRv1 implementation, I left MOZ_ASSERT_UNREACHABLE assertions at various places when we encounter cases that should never exist in valid fonts. However, as we handle these anomalies safely, the assertions aren't really needed and just create noise in testing.

There are also some cases where we can pre-emptively bail out of processing a table, such as when a relative paintOffset field is zero; this can never be valid as it would lead to infinite self-recursion.

Assignee: nobody → jfkthame
Status: NEW → ASSIGNED
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cc5332b0fdf
Improve handling of errors in COLRv1 font tables. r=gfx-reviewers,lsalzman

Backed out for causing build bustage on COLRFonts.cpp

Backout link

Push with failures

Failure log

Failure line: /builds/worker/checkouts/gecko/gfx/thebes/COLRFonts.cpp:1680:10: error: 'return' will never be executed [-Werror,-Wunreachable-code-return]

Flags: needinfo?(jfkthame)
Flags: needinfo?(jfkthame)
Pushed by jkew@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7883889e8974
Improve handling of errors in COLRv1 font tables. r=gfx-reviewers,lsalzman
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: