On Tue, May 9, 2017 at 12:05 PM, Boris Zbarsky <bzbar...@mit.edu> wrote:
> On 5/9/17 11:41 AM, Nathan Froyd wrote: > >> I think I would feel a little >> better about this rule if we permitted it only for types that deleted >> assignment operators. Not sure if that's really practical to enforce. >> > > Hmm. I wonder what happens right now if you try to invoke > nsINode::operator=.... > > But yes, having such a restriction would make sense to me if we can do it. It wouldn't be too difficult to have a static analysis which complains if a RefCounted object (An object with AddRef and Release methods) is assigned into at all, with the assumption that that will do The Wrong Thing™ 100% of the time. This of course would only be caught on infrastructure because most people don't run the SA locally (we have a bug to make this easier which Andi is working on), but that might be OK as none of this code would get into the tree. > > > -Boris > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform