Closed Bug 1048916 Opened 5 years ago Closed 5 years ago

Convert a bunch of layers from nsAutoPtr to UniquePtr

Categories

(Core :: Graphics: Layers, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: jrmuizel, Assigned: jrmuizel)

Details

Attachments

(1 file)

This makes the ownership of LayerProperties more clear.
Attachment #8467794 - Flags: review?(roc)
https://hg.mozilla.org/integration/mozilla-inbound/rev/9545e672983b

I ended up having to change this kind of thing:
UniquePtr<LayerProperties> props(computeInvalidRect ? 
                       LayerProperties::CloneFrom(layerManager->GetRoot()) : 
                       nullptr);

to

UniquePtr<LayerProperties> props;
if (computeInvalidRect)
  props = Move(LayerProperties::CloneFrom(layerManager->GetRoot()))

because gcc-4.4 is not that good at C++
https://hg.mozilla.org/mozilla-central/rev/dbd6f67cc8a8
Assignee: nobody → jmuizelaar
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Flags: qe-verify-
You need to log in before you can comment on or make changes to this bug.