Closed Bug 1174383 Opened 6 years ago Closed 6 years ago

Fix bogus gfx/2d debug assertions that have side effects

Categories

(Core :: Graphics, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

Details

Attachments

(1 file)

gfx/2d/ExtendInputEffectD2D1.cpp and RadialGradientEffectD2D1.cpp have debug assertions that assign to the asserted variable instead of testing for equality:

  MOZ_ASSERT(inputIndex = 0);

However, this typo suggests that the ExtendInputEffectD2D1 and RadialGradientEffectD2D1::MapInvalidRect() functions are not actually called because these assertions would always fail because the assigned expression value is 0. :)
Attachment #8621943 - Flags: review?(bas)
Comment on attachment 8621943 [details] [diff] [review]
fix-MapInvalidRect-inputIndex-asserts.patch

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

It's possible, these are internal D2D functions and they're required to be implemented by the effect spec, I'm not so certain D2D actually calls them :).
Attachment #8621943 - Flags: review?(bas) → review+
https://hg.mozilla.org/mozilla-central/rev/600c02fb4be2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.