On Wed, Mar 17, 2010 at 10:01 PM, Henrik Lindqvist <
henrik.lindqv...@gmail.com> wrote:

> How would the native code know if walking the prototype chain is
> needed or not? Whouldn't it depend on how the user calls functions in
> JavaScript code?
>

Good question:

http://code.google.com/p/v8-juice/wiki/ClassWrapPolicies#ToNative_SearchPrototypesForNative_Option

In short: the developer wrapping the native class decides for the user
whether the feature is enabled or not (on a per-native-class basis). Most
cases don't need prototype walking, but of course if inheritance is used
then it must be enabled. The option is, in that library, togglable because a
specific client suggested it as a performance optimization (they were using
it in a high-load server environment).

:)

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users

Reply via email to