Closed Bug 956796 Opened 6 years ago Closed 6 years ago

Wrong assertion and a typo cancel each other

Categories

(Core :: Graphics, defect)

28 Branch
x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla29

People

(Reporter: milan, Assigned: milan)

References

Details

Attachments

(1 file, 1 obsolete file)

Inside of gfxPlatform.cpp, SRGBOverrideObserver::Observe method asserts:

    NS_ASSERTION(NS_strcmp(someData,
                   MOZ_UTF16("gfx.color_mangement.force_srgb")),
                 "Restarting CMS on wrong pref!");

Two things are wrong.  We want to make sure that the preference we get is gfx.color_management.force_srgb, so we should assert NS_strcmp(...) == 0, rather than NS_strcmp(...).  However, this is cancelled by the typo in the preference name (note the missing a in mangement above).  Two wrongs made right, but the assertion as such isn't really useful.
Assignee: nobody → milan
Fix the assert and the preference name, and do the #define for the other color management prefs.
Attachment #8356194 - Flags: review?(bgirard)
Comment on attachment 8356194 [details] [diff] [review]
Fix the preference name inside the assert, as well as the assert itself.

Review of attachment 8356194 [details] [diff] [review]:
-----------------------------------------------------------------

LGTM
Attachment #8356194 - Flags: review?(bgirard) → review+
Carry r=bgirard.  Refresh the patch with the PUChar change.
Attachment #8357882 - Flags: review+
Attachment #8356194 - Attachment is obsolete: true
(In reply to Wes Kocher (:KWierso) from comment #4)
> Backed out in
> https://hg.mozilla.org/integration/mozilla-inbound/rev/4a3e51bf999b because
> it apparently broke the build: 
> 
> https://tbpl.mozilla.org/php/getParsedLog.php?id=32722214&tree=Mozilla-
> Inbound

Yes it did, I crossed wires with the PUChar change.  The latest patch should be OK.
https://hg.mozilla.org/mozilla-central/rev/16d98bdc461c
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.