Status: Accepted
Owner: [email protected]
Labels: Type-Bug Priority-Medium
New issue 3066 by [email protected]: NativeDataProperty accessor
attached to the PrototypeTemplate is not called
http://code.google.com/p/v8/issues/detail?id=3066
This either a bug in the lookup routines that go through the prototype
chain or documentation's deficiency. In either case it should be either
checked& documented or fixed because current behavior is definitely
unexpected.
v8::Local<v8::FunctionTemplate> t = v8::FunctionTemplate::New(isolate_);
v8::Local<v8::Template> proto = t->PrototypeTemplate(); // (1)
proto->SetNativeDataProperty(v8_str("prop"),
&PropNativeGetter,
NULL,
v8::External::New(isolate_, NULL));
env_->Global()->Set(v8_str("Klass"), t->GetFunction());
CompileRun("obj.prop // <- here it will not call PropNativeGetter");
if at (1) you replace PrototypeTemplate with InstanceTemplate then
everything works.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" 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/groups/opt_out.