Open
Bug 968799
Opened 10 years ago
Updated 2 years ago
disallow already_AddRefed members in classes
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
NEW
People
(Reporter: froydnj, Unassigned)
References
(Depends on 1 open bug)
Details
The reason for doing this is that people should be making ownership more clear via .forget() and/or .swap() and/or similar. The plan for doing this is to mark already_AddRefed as MOZ_STACK_CLASS. This is almost airtight; the loopholes are: - having already_AddRefed members in a MOZ_STACK_CLASS; and - declaring already_AddRefed variables. Ideally these will not be a problem. (We don't seem to have any uses of either of these patterns in the tree.) I talked this over with jcranmer and he said that MOZ_STACK_CLASS seems good enough.
Comment 1•10 years ago
|
||
I don't think we should do this, as I said in https://bugzilla.mozilla.org/show_bug.cgi?id=968836#c2 already_AddRefed is less hazard than nsCOMPtr when dealing with threads
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•