Closed Bug 1047755 Opened 10 years ago Closed 10 years ago

ZoomConstraints needs a copy ctor with MOZ_COUNT_CTOR

Categories

(Core :: Graphics: Layers, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: khuey, Assigned: wlitwinczyk)

References

Details

Attachments

(2 files, 1 obsolete file)

ZoomConstraints (http://hg.mozilla.org/mozilla-central/annotate/6551323d96e6/gfx/layers/FrameMetrics.h#l585) has an implicit copy constructor which of course does not MOZ_COUNT_CTOR.  So when instances of ZoomConstraints created via the copy ctor are destroyed the count of objects underflows.
Assignee: nobody → wlitwinczyk
Attachment #8470917 - Flags: review?(botond)
The same is probably needed for ScrollableLayerGuid, also in FrameMetrics.h
Attachment #8470917 - Flags: review?(botond) → review+
NB: We're currently underflowing because of this, so you might have to adjust the b2g leak threshold value[0] *upwards* when you land this.

[0] http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/mochitest_options.py#759
Added because of comment 2
Attachment #8470954 - Flags: review?(botond)
Attachment #8470917 - Attachment description: zoomconstraint_copy_ctor → zoomconstraint_copy_ctor.patch1
Comment on attachment 8470954 [details] [diff] [review]
scrollablelayerguid_copy_ctor.patch2

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

::: gfx/layers/FrameMetrics.h
@@ +539,5 @@
>      MOZ_COUNT_CTOR(ScrollableLayerGuid);
>    }
>  
> +  ScrollableLayerGuid(const ScrollableLayerGuid& other)
> +      : mLayersId(other.mLayersId)

Please indent with 2 spaces to remain consistent with the rest of the file.
Attachment #8470954 - Flags: review?(botond) → review+
r=botond carried forward

Fixed indentation
Attachment #8470954 - Attachment is obsolete: true
Attachment #8470960 - Flags: review+
Try: https://tbpl.mozilla.org/?tree=Try&rev=b1dbdfbb977a

There are two failures on Mulet Linux. One looks like a test problem (#2), the other I don't think would be caused by this patch (#4).
Those two tests are hidden on m-c/inbound because they're not passing yet. Try shows them for the benefit of people working on making those tests pass. So yeah, you can ignore those failures.
Try passes
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/ef9c787f02d6
https://hg.mozilla.org/mozilla-central/rev/d6b4f47d6fae
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: