Not initialized used in CairoImageOGL::SetData

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: romaxa, Assigned: romaxa)

Tracking

Trunk
x86
Linux
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

Problem is that mSize not initialized in ctor.
and After ctor we usually call ::SetData
and that is comparing mSize with new Size... but mSize not initialized.

Also this cause sometime wrong logic executed... because mSize initialized from previous class (destroyed before)
Attachment #497235 - Flags: review?(vladimir)
Blocks: 619056
Comment on attachment 497235 [details] [diff] [review]
Initialize mSize

Safe enough
Attachment #497235 - Flags: approval2.0?
Attachment #497235 - Flags: approval2.0? → approval2.0+
Keywords: checkin-needed
Assignee: nobody → romaxa
This patch is fine, but I don't think it's really the best fix for the bug. CairoImage::SetData should only be called once for any given CairoImage object, because Images are supposed to be immutable. So the mSize != aData.mSize check should simply be removed.
Attachment #497235 - Flags: approval2.0+ → approval2.0?
Comment on attachment 497235 [details] [diff] [review]
Initialize mSize

No really, I think this is fine, but I think we should also remove the unnecessary code.
Attachment #497235 - Flags: approval2.0? → approval2.0+
Actually this is what I have done in the beginning...
Attachment #497741 - Flags: review?(vladimir)
do we want single SetData per image still or should I close this bug?
We should land your patch here.
Attachment #497741 - Flags: review?(vladimir)
Attachment #497741 - Flags: review+
Attachment #497741 - Flags: approval2.0+
Else condition was already removed...
A bit modified patch removing mSize check completely.
Pushed in my patch queue... 
http://hg.mozilla.org/users/romaxa_gmail.com/workbase_prc2/file/346821a07889/bug618788_remove_size_check.diff
http://hg.mozilla.org/mozilla-central/rev/92e1764dc180
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.