Re: XPCOM Tidying Proposal

2019-01-14 Thread Kyle Machulis
On Mon, Jan 14, 2019 at 9:12 AM Bobby Holley wrote: > > I think the answer is "it depends". BasePrincipal makes a lot of sense for > principals, because it allows for a lot of sharing among the subclasses, of > which there are only four. URIs are more complicated, and probably deserve > a

Re: XPCOM Tidying Proposal

2019-01-14 Thread Bobby Holley
On Fri, Jan 11, 2019 at 3:10 PM Kyle Machulis wrote: > On Fri, Jan 11, 2019 at 11:59 AM Bobby Holley > wrote: > >> The idea is that we should gradually pass BasePrincipal around the >> codebase >> rather than nsIPrincipal, which would avoid the need to invoke Cast at the >> specific callsite. I

Re: XPCOM Tidying Proposal

2019-01-11 Thread Kyle Machulis
On Fri, Jan 11, 2019 at 11:59 AM Bobby Holley wrote: > The idea is that we should gradually pass BasePrincipal around the codebase > rather than nsIPrincipal, which would avoid the need to invoke Cast at the > specific callsite. I have no objection to your proposed pattern in the > interim if it

Re: XPCOM Tidying Proposal

2019-01-11 Thread Bobby Holley
On Fri, Jan 11, 2019 at 11:30 AM Boris Zbarsky wrote: > On 1/10/19 6:15 PM, Kyle Machulis wrote: > > - Removal of [noscript] methods in interfaces in favor of direct calls > via > > Cast() where possible. > > This seems generally reasonably, though I'd like to put in a bit of a > vote for the

Re: XPCOM Tidying Proposal

2019-01-11 Thread Boris Zbarsky
On 1/10/19 6:15 PM, Kyle Machulis wrote: - Removal of [noscript] methods in interfaces in favor of direct calls via Cast() where possible. This seems generally reasonably, though I'd like to put in a bit of a vote for the pattern I recently used for nsIPrincipal::IsSystemPrincipal, which

Re: XPCOM Tidying Proposal

2019-01-11 Thread Kyle Machulis
On Fri, Jan 11, 2019 at 7:21 AM Nathan Froyd wrote: > > - Removal of [noscript] methods in interfaces in favor of direct calls > via > > Cast() where possible. > > - Direct getters through Cast() where possible, infallible (also where > > possible) otherwise. > > For avoidance of doubt, since I

Re: XPCOM Tidying Proposal

2019-01-11 Thread Nathan Froyd
On Thu, Jan 10, 2019 at 6:15 PM Kyle Machulis wrote: > In an effort to bring Marie Kondo memes to dev-platform, I'd like to > propose an XPCOM tidying project. +1. > - Removal of [noscript] methods in interfaces in favor of direct calls via > Cast() where possible. > - Direct getters through

XPCOM Tidying Proposal

2019-01-10 Thread Kyle Machulis
In an effort to bring Marie Kondo memes to dev-platform, I'd like to propose an XPCOM tidying project. Through DeCOMtamination, Quantum, Fission, and other projects, we've managed to un-hide quite a few headers to C++ classes that would've otherwise been only accessible through XPCOM interfaces,