For functions that take `already_AddRefed<T>&&`, change to `already_AddRefed<T>` (pass by value instead of by rvalue reference), to force an ownership-transfer into the function (in xpcom and several other directories)
Categories
(Core :: XPCOM, task)
Tracking
()
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(1 obsolete file)
Doing s/already_AddRefed<T>&&/already_AddRefed<T>/ in function parameters -- see bug 2044510 comment 0 for explanation.
I'm splitting this up into different directories so that it can be reviewed/landed in a piecewise manner, since the whole-tree patch is so large.
This bug is for the xpcom/ directory.
| Assignee | ||
Comment 1•3 months ago
|
||
This adds strictness, in a way that better-matches our intent when we pass
an already_AddRefed as an argument.
See https://bugzilla.mozilla.org/show_bug.cgi?id=2044510#c0 for more details.
Updated•3 months ago
|
| Assignee | ||
Updated•3 months ago
|
| Assignee | ||
Comment 2•3 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
I'm splitting this up into different directories so that it can be reviewed/landed in a piecewise manner, since the whole-tree patch is so large.
hmm, actually now I'm thinking it's better to just land the whole patch all at once. In the off chance that there are some overridden virtual functions in here (I found a few that are delcared as virtual/override), changing a function signature in one spot (e.g. as part of landing a piecewise patch) might inadvertently break an inheritance relationship with a subclass/superclass elsewhere in the tree.
Tentatively duping back to bug 2044510.
| Assignee | ||
Comment 3•3 months ago
|
||
(I guess I can split up the patch into pieces in a single stack on the main bug, for ease of review so phabricator presents each one nicely, and then land them atomically as a stack to mitigate the potential for inheritance issues that I described in comment 2.)
Comment 4•3 months ago
|
||
Comment on attachment 9592887 [details]
Bug 2044569: Pass already_AddRefed types by-value instead of by rvalue reference, in xpcom/. r?#xpcom-reviewers
Revision D304349 was moved to bug 2044510. Setting attachment 9592887 [details] to obsolete.
Description
•