Hi,

Using V8 5.1.

I have this function template class "Group":

templ->SetClassName(v8::String::NewFromUtf8(isolateP, "Group"));

  v8::Handle<v8::ObjectTemplate> inst = templ->InstanceTemplate();
inst->SetInternalFieldCount(1);

I set an accessor "foo", and this one gets always called when doing 
"group.foo":

inst->SetAccessor(v8::String::NewFromUtf8(isolateP,* "foo"*), getProperty, 
0, v8::Int32::New(42));

The interceptor intercepts "bar". GroupNamedQueryInterceptor returns 
"v8::PropertyAttribute::None" for "bar"

inst->SetHandler(v8::NamedPropertyHandlerConfiguration(
*GroupNamedPropertyGetter*, NULL, *GroupNamedQueryInterceptor*, NULL, NULL,
v8::Local<v8::Value>(),
v8::PropertyHandlerFlags(0)));

The initial instance is created with:

v8::Handle<v8::Object> instance = ...>GetFunction()->NewInstance();

And added to the global scope as "group" of class "Group"

When executing "group.bar", I get in the interceptor 
*GroupNamedQueryInterceptor*. The getter *GroupNamedPropertyGetter* creates 
a *new instance* of same class "Group", and returns it.

So now "bar" is an instance of "Group" as well.

So I would expect "group.bar.bar" to come back in the interceptor a second 
time, but it does not!

However "group.bar.foo" accesses the second instance accessor just fine.

It feels really strange. I was hoping someone could unstuck me.

Thanks in advance!
alex

-- 
-- 
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to