Bug 1349379 - Deprecate already_AddRefed only with RefPtr, not with nsCOMPtr. - r=dbaron draft
authorJeff Gilbert <jgilbert@mozilla.com>
Tue, 21 Mar 2017 17:55:00 -0700
changeset 502538 a8f44bf928790810b4c902d091c4c1e4a6cb8011
parent 502526 6a402de999cda0793828b2e3ff24202f8390e4d9
child 550190 d93fa79783965ccfa14ce66e34f732ba75d5fa6b
push id50318
push userbmo:jgilbert@mozilla.com
push dateWed, 22 Mar 2017 00:55:32 +0000
reviewersdbaron
bugs1349379
milestone55.0a1
Bug 1349379 - Deprecate already_AddRefed only with RefPtr, not with nsCOMPtr. - r=dbaron MozReview-Commit-ID: 6nC7f7LSWTF
mfbt/AlreadyAddRefed.h
--- a/mfbt/AlreadyAddRefed.h
+++ b/mfbt/AlreadyAddRefed.h
@@ -23,19 +23,20 @@ struct unused_t;
  * already_AddRefed cooperates with reference counting smart pointers to enable
  * you to assign in a pointer _without_ |AddRef|ing it.  You might want to use
  * this as a return type from a function that returns an already |AddRef|ed
  * pointer.
  *
  * TODO Move already_AddRefed to namespace mozilla.  This has not yet been done
  * because of the sheer number of usages of already_AddRefed.
  *
- * @deprecated This class is unnecessary now that RefPtr supports move
- *             construction.  New code should return a RefPtr instead of an
- *             already_AddRefed.
+ * @deprecated This class deprecated for use with RefPtr, now that RefPtr
+ *             supports move construction. New code should return a RefPtr
+ *             instead of an already_AddRefed.
+ *             Use with nsCOMPtr is *not* deprecated, and is still required.
  */
 template<class T>
 struct MOZ_MUST_USE_TYPE MOZ_NON_AUTOABLE already_AddRefed
 {
   /*
    * We want to allow returning nullptr from functions returning
    * already_AddRefed<T>, for simplicity.  But we also don't want to allow
    * returning raw T*, instead preferring creation of already_AddRefed<T> from