(In reply to Ms2ger from comment #139)
> Comment on attachment 604291
> Use nsCOMPtr copy constructor
>
> Use assignment, as in
>
> nsCOMPtr<nsIDOMMozPowerManager> power = mPowerManager;
>
> r=me with that
OK, I lied. It's not copy constructor but a normal constructor from a raw pointer.
I cannot assign mPowerManager to a nsCOMPtr directly because it's a nsRefPtr.
Do you want me to use
nsCOMPtr<nsIDOMMozPowerManager> power = mPowerManager.get();
instead? It looks uglier then the normal constructor.
(In reply to Ms2ger from comment #139) nsIDOMMozPowerM anager> power = mPowerManager;
> Comment on attachment 604291
> Use nsCOMPtr copy constructor
>
> Use assignment, as in
>
> nsCOMPtr<
>
> r=me with that
OK, I lied. It's not copy constructor but a normal constructor from a raw pointer.
I cannot assign mPowerManager to a nsCOMPtr directly because it's a nsRefPtr.
Do you want me to use
nsCOMPtr< nsIDOMMozPowerM anager> power = mPowerManager. get();
instead? It looks uglier then the normal constructor.