Re: Suggesting new name for nsIDOMEvent::GetInternalNSEvent

2016-02-11 Thread Aidin Gharibnavaz
Yes, these are two different objects, so As* seems not right here. Unfortunately,WidgetEventPtr is already used as the name of a pointer in this IDL. So far, WidgetEventRef is selected. On Thu, Feb 11, 2016 at 10:23 AM, Bobby Holley wrote: > IMO, As* generally implies a cast between two differe

Re: Suggesting new name for nsIDOMEvent::GetInternalNSEvent

2016-02-10 Thread Bobby Holley
IMO, As* generally implies a cast between two different types for the same underlying object, or at least a reflexive conversion between two different "view" (for some fuzzy definition of that). Even in cases where we have two objects with a 1-to-1 correspondence, As* feels inappropriate to me. For

Re: Suggesting new name for nsIDOMEvent::GetInternalNSEvent

2016-02-10 Thread Kyle Huey
What's wrong with AsWidgetEvent? We do AsFoo a fair bit. - Kyle On Feb 10, 2016 8:58 PM, "Aidin Gharibnavaz" wrote: > In Bug 1235830 , I'm > going to rename this method to something more meaningful. I need suggestion > about what the name sho

Re: Suggesting new name for nsIDOMEvent::GetInternalNSEvent

2016-02-10 Thread Bobby Holley
I tend to use the WidgetEventPtr() or WidgetEventRef() for situations where I need a decorator to avoid colliding with the type name. Maybe try that? bholley On Wed, Feb 10, 2016 at 8:57 PM, Aidin Gharibnavaz wrote: > In Bug 1235830 , I'm >