Created attachment 497235 [details] [diff] [review] Initialize mSize 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)
Attachment #497235 - Flags: review?(vladimir) → review+
Comment on attachment 497235 [details] [diff] [review] Initialize mSize Safe enough
Attachment #497235 - Flags: approval2.0?
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.
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.
Created attachment 497741 [details] [diff] [review] Followup to last comment, Remove code, Actually this is what I have done in the beginning...
do we want single SetData per image still or should I close this bug?
We should land your patch here.
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
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.