Make nsCSSValue's AdoptListValue & AdoptPairListValue methods take a UniquePtr

RESOLVED FIXED in Firefox 48

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: dholbert, Assigned: dholbert)

Tracking

Trunk
mozilla48
Points:
---

Firefox Tracking Flags

(firefox48 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Bug 1260655 added some handy AdoptListValue and AdoptPairListValue functions which can take ownership from some external object into our nsCSSValue.

Right now, they're exclusively called with UniquePtr-owned objects (which is great!)  So, we should just make them take UniquePtr-flavored args as well, so that we can make the ownership transfer more explicit using Move() (instead of "release" which they use right now)
(Assignee)

Comment 1

3 years ago
Created attachment 8741518 [details] [diff] [review]
fix v1

(Haven't tested this thoroughly yet, beyond verifying that it seems to compile correctly in layout/style.)
(Assignee)

Comment 2

3 years ago
Comment on attachment 8741518 [details] [diff] [review]
fix v1

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

Looks like this is good: https://treeherder.mozilla.org/#/jobs?repo=try&revision=bac35e76f5a8

Requesting review.
Attachment #8741518 - Flags: review?(cam)
(Assignee)

Comment 3

3 years ago
(Also: I'm planning on rebasing on top of bug 1110460 before landing -- I suggested adding one more call to one of these methods there, and that call will need the same trivial s/release()/Move/ treatment for it to play nicely with this patch. I'll wait for that bug's patch to be finished & land before landing here, because I don't want to cause bitrot for jwatt while he's addressing my review comments.)
Attachment #8741518 - Flags: review?(cam) → review+

Comment 5

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/8bc1d52fcf71
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox48: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in before you can comment on or make changes to this bug.