Re: assignment between related nsCOMPtrs<> now works

2018-10-02 Thread Kris Maglione

On Tue, Oct 02, 2018 at 09:29:51AM -0700, Andrew McCreight wrote:

This is a step towards bug 1493226, which is going to statically ban
trivial do_QueryInterface calls like this:


\o/
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: assignment between related nsCOMPtrs<> now works

2018-10-02 Thread Andrew McCreight
On Tue, Oct 2, 2018 at 9:33 AM Bobby Holley  wrote:

> This is awesome - great papercut fix. Thanks Andrew!
>
> Any chance of fixing it for RefPtr too?
>

That should already work:
https://searchfox.org/mozilla-central/rev/6ddb5fb144993fb5de044e2e8d900d7643b98a4d/mfbt/RefPtr.h#142



> On Tue, Oct 2, 2018 at 9:30 AM Andrew McCreight 
> wrote:
>
>> I've landed bug 1494765, which allows you to do assignments between
>> nsCOMPtrs for classes that are related by subtyping.
>>
>> For instance:
>>
>> class A { ... ];
>> class B : public A { ... };
>>
>> nsCOMPtr b = ...;
>> nsCOMPtr a = b; // this works now
>>
>> This is a step towards bug 1493226, which is going to statically ban
>> trivial do_QueryInterface calls like this:
>>
>> nsCOMPtr a2 = do_QueryInterface(b);
>> ___
>> 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


Re: assignment between related nsCOMPtrs<> now works

2018-10-02 Thread Bobby Holley
This is awesome - great papercut fix. Thanks Andrew!

Any chance of fixing it for RefPtr too?

On Tue, Oct 2, 2018 at 9:30 AM Andrew McCreight 
wrote:

> I've landed bug 1494765, which allows you to do assignments between
> nsCOMPtrs for classes that are related by subtyping.
>
> For instance:
>
> class A { ... ];
> class B : public A { ... };
>
> nsCOMPtr b = ...;
> nsCOMPtr a = b; // this works now
>
> This is a step towards bug 1493226, which is going to statically ban
> trivial do_QueryInterface calls like this:
>
> nsCOMPtr a2 = do_QueryInterface(b);
> ___
> 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


assignment between related nsCOMPtrs<> now works

2018-10-02 Thread Andrew McCreight
I've landed bug 1494765, which allows you to do assignments between
nsCOMPtrs for classes that are related by subtyping.

For instance:

class A { ... ];
class B : public A { ... };

nsCOMPtr b = ...;
nsCOMPtr a = b; // this works now

This is a step towards bug 1493226, which is going to statically ban
trivial do_QueryInterface calls like this:

nsCOMPtr a2 = do_QueryInterface(b);
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform