On Wed, Aug 13, 2014 at 9:24 AM, Aryeh Gregor <a...@aryeh.name> wrote:
>
> No, because the use-case is where you don't want to leak the ref --
> you want it to be released automatically for you.  So for instance,
> here's a real-world bit of code from nsWSRunObject:
>
>       if ((aRun->mRightType & WSType::block) &&
>           IsBlockNode(nsCOMPtr<nsINode>(GetWSBoundingParent()))) {

I don't think this is a common problem outside of editor. Editor code
was written using a lot of weird conventions and it doesn't surprise
me that it leads to code patterns like this one. But it's not
something I've seen be a problem elsewhere.

/ Jonas
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to