Fix stylesheet validation of functions with additional prototype methods (#27264)
Fix stylesheet validation of functions with additional prototype methods (#27264)

Summary:
Some babel plugins add additional methods to `Function.prototype` (see https://github.com/MatAtBread/fast-async):

```js
Function.prototype.$asyncbind = function $asyncbind(self, catcher) {
...
```

Although undocumented, React Native allows functions to be passed to `StyleSheet.create()` for dynamic styling:

```js
const styles = StyleSheet.create({
  animalItem: height => ({ height })
});
```

If there are additional custom methods on `Function.prototype`, React Native's `StyleSheetValidation.validateStyle` will loop through these properties and raise an error because those properties are not valid style keys, because it loops through _all_ properties, including inherited ones.

![Simulator Screen Shot - iPhone 11 Pro Max - 2019-11-19 at 12 04 49](https://user-images.githubusercontent.com/4031216/69145112-ce589100-0ac4-11ea-80d7-e93d59b935a8.png)

This PR modifies `StyleSheetValidation.validateStyle` to only loop through the style's own properties, instead of including inherited ones.

## Changelog

[General] [Fixed] - Fix stylesheet validation for functions with custom prototype methods.
Pull Request resolved: https://github.com/facebook/react-native/pull/27264

Test Plan: - Tested that non-function style properties are still validated

Differential Revision: D18694895

Pulled By: hramos

fbshipit-source-id: b36f4a62a435e7b6a689398de3bcc06d6bb14293

arthuralee/react-native,pandiaraj44/react-native,arthuralee/react-native,exponentjs/react-native,janicduplessis/react-native,javache/react-native,hammerandchisel/react-native,myntra/react-native,pandiaraj44/react-native,myntra/react-native,exponent/react-native,facebook/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,exponent/react-native,pandiaraj44/react-native,exponentjs/react-native,janicduplessis/react-native,hoangpham95/react-native,pandiaraj44/react-native,exponentjs/react-native,facebook/react-native,facebook/react-native,myntra/react-native,hoangpham95/react-native,arthuralee/react-native,hoangpham95/react-native,exponentjs/react-native,hammerandchisel/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,facebook/react-native,javache/react-native,hoangpham95/react-native,janicduplessis/react-native,exponent/react-native,exponentjs/react-native,exponent/react-native,pandiaraj44/react-native,exponent/react-native,hoangpham95/react-native,facebook/react-native,hammerandchisel/react-native,hammerandchisel/react-native,javache/react-native,exponentjs/react-native,facebook/react-native,facebook/react-native,javache/react-native,exponent/react-native,javache/react-native,facebook/react-native,exponent/react-native,javache/react-native,myntra/react-native,pandiaraj44/react-native,hammerandchisel/react-native,facebook/react-native,myntra/react-native,exponentjs/react-native,hoangpham95/react-native,arthuralee/react-native,janicduplessis/react-native,exponent/react-native,hammerandchisel/react-native,javache/react-native,myntra/react-native,janicduplessis/react-native,hoangpham95/react-native,hammerandchisel/react-native,pandiaraj44/react-native,janicduplessis/react-native,myntra/react-native,javache/react-native,arthuralee/react-native,exponentjs/react-native,hoangpham95/react-native,myntra/react-native