Open Bug 1603736 Opened 5 years ago Updated 2 years ago

Harmonize nsCOMPtr<nsISupports> specialization with generic nsCOMPtr<T>

Categories

(Core :: XPCOM, task)

task

Tracking

()

People

(Reporter: sg, Unassigned)

Details

The nsCOMPtr<nsISupports> specialization is missing a few features that nsCOMPtr<T>, which do not appear intentional based on the description:

  • nsCOMPtr<T> can be constructed or assigned implicitly from a raw pointer, rvalue reference to an nsCOMPtr, lvalue or rvalue reference to an already_AddRefed derived from T. nsCOMPtr<nsISupports> allows this only for a raw pointer.
  • nsCOMPtr<T> is copy/move-constructible and copy/move-assignable, while nsCOMPtr<nsISupports> is only copy-constructible and copy-assignable
  • nsCOMPtr<T> can be constructed or assigned from a OwningNonNull of the same or a derived type, but nsCOMPtr<nsISupports> cannot
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.