Open
Description
Problem: the JS_HasProperty + JS_GetProperty pattern shows up quite a bit and it's fairly expensive when the property exists on the prototype chain because it walks the prototype chain twice. Even when the property is on the this
object, it still does double work.
Solution: add a JS_TryGetProperty that combines both operations, a la JS_TryGetPropertyInt64.
(JS_TryGetPropertyInt64 could be optimized the same way as well, by the way.)