Closed Bug 1786209 Opened 2 years ago Closed 2 years ago

Some mochitests attempt to set `gfx.font_loader.delay` themselves, but that's unnecessary and not-allowed since it's a "mirror:once" pref

Categories

(Core :: DOM: Events, defect)

defect

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed
firefox106 --- affected

People

(Reporter: dholbert, Assigned: dholbert)

Details

Attachments

(1 file)

While investigating bug 1786170, I noticed that two mochitests set the pref gfx.font_loader.delay themselves.

This might've worked at some point, but nowadays it's bad because it's:
(A) unnecessary -- they're setting it to the value that it already has (via their mochitest.ini file)
(B) Ineffective the pref has mirror: once which essentially means its value is established at startup and changes don't take effect after that.
(C) A fatal-assertion footgun -- if we were actually attempting to change the pref here, then this would trip the following fatal assertion:

Assertion failure: staticPrefValue == preferenceValue (Preference 'gfx.font_loader.delay' got modified since StaticPrefs::gfx_font_loader_delay_AtStartup was initialized. Consider using an always mirror kind instead), $OBJ/dist/include/mozilla/StaticPrefList_gfx.h:400

--> Filing this bug to remove this boilerplate from these tests.

In particular, "gfx.font_loader.delay" can only be set at startup, so these
tests' attempted adjustments can't have any effect. And they'll cause a fatal
assertion-failure (to alert you about this ineffectiveness) if they actually
try to change the pref to a different value.

Pushed by dholbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/28115f0240ac
Remove some mochitests' unnecessary & ineffective gfx.font_loader pref-setting statements. r=emilio
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: