walk js prototype chain to retrieve native ptr

walk js prototype chain to retrieve native ptr