Brian Smith wrote:

In PSM, we created some scoped pointer wrapper types around NSS data structures 
(ScopedNSSTypes.h), which are based on the MFBT scoped pointers. And, 
consequently, PSM has standardized on MFBT smart pointers throughout the module 
(there should be nsRefPtr in PSM, only RefPtr, for example). Yet, most code in 
Gecko is based on the nsCOMPtr-like smart pointers (nsAutoPtr, nsRefPtr). I 
don't know how big of a deal this is, but this is the type of thing that would 
need to be resolved to have a consistent style throughout Gecko.

I thought that it was pretty clear which smart pointer to use:
nsCOMPtr - interfaces
nsRefPtr - concrete types that inherit from nsISupports
RefPtr - everything else (i.e. no QueryInterface)

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to