A note on bad practices leading to frail code...

Calling values.hasOwnProperty will likely be fine if the values object only 
ever comes from generated gwt code,
but from experience elsewhere, I always try to do 
Object.prototype.hasOwnProperty.call(values, prop);

Obviously if anyone wrecks .hasOwnPropety, they can't honestly expect 
support,
but for objects created with Object.create(null), there will be no Object 
prototype and .hasOwnProperty won't exist.

Not really relevant to this bug, but for the sake of promoting good 
practices, I thought I'd mention it.

On Thursday, July 12, 2012 2:24:06 PM UTC-6, Chris Gamache wrote:
>
> Posted...  
> http://code.google.com/p/google-web-toolkit/issues/detail?id=7513 
>
> Thank you for all your help!
>
> On Wednesday, July 11, 2012 12:16:31 PM UTC-4, Thomas Broyer wrote:
>>
>>
>>
>> On Wednesday, July 11, 2012 5:46:16 PM UTC+2, Chris Gamache wrote:
>>>
>>>
>>> I am using Ext-Js LGPL via GWT-Ext, and they have indeed modified the 
>>> Array prototype. Not much I can do about that. I'm stuck there.
>>>
>>> I hacked in the modification, and it will get through to compile now. Is 
>>> there already an issue in the tracker for the xsiframe generator bug/bad 
>>> practice?
>>>
>>
>> I don't know of any, and this __getPropMap seems to only be used for 
>> SuperDevMode so it's not surprising that this bug hadn't been discovered 
>> yet.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/PuWBAWcxIQkJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to