Well, I'm not doing any Private::New, so it must be something else causing the the configuration to be different :(
On Sunday, October 30, 2016 at 3:43:58 PM UTC-7, Caitlin Potter wrote: > > > > > Sent from my iPhone > On Oct 30, 2016, at 6:18 PM, Zac Hansen <xax...@gmail.com <javascript:>> > wrote: > > I've boiled it down to the > > LookupIterator::configuration & kPrototypeChain == true > > > being the problem. So, what can cause that to be true? It seems to be > the default unless name->IsPrivate() is true here: > > > > https://github.com/v8/v8/blob/c2a5dc81c7a26579a599ddaf31a7cf84706135b9/src/lookup.h#L329 > > > but I don't know what that means. > > IsPrivate() is true if the name is a Symbol with its private field set, > equivalent to ECMA262 "internal fields" (like, [[ViewedArrayBuffer]], for > example). It looks like it's possible to create such a symbol via the API > using v8::Private::New, or the SymbolFor api. These are never looked up in > the prototype chain, AFAIK are never exposed to interceptors, and are never > exposed to JSProxy hooks. > > Hope that helps in some way. > > > On Saturday, October 29, 2016 at 3:33:14 AM UTC-7, Zac Hansen wrote: >> >> I run the following javascript: >> >> var p = new Point(); p.foo = 5; >> >> where Point creates an object from an ObjectTemplate that has >> had SetHandler called on it. However, this calls my getter callback. >> Everything I've tried from javascript calls my getter callback. >> >> object_template->SetHandler(v8::NamedPropertyHandlerConfiguration( >> // Getter >> [](v8::Local<v8::Name> property_name, >> v8::PropertyCallbackInfo<v8::Value> const & info){ >> printf("IN GETTER CALLBACK111 %s\n", >> *v8::String::Utf8Value(property_name)); >> }, >> // setter >> [](v8::Local<v8::Name> property_name, >> v8::Local<v8::Value> new_property_value, >> v8::PropertyCallbackInfo<v8::Value> const & info){ >> printf("IN SETTER CALLBACK222 %s\n", >> *v8::String::Utf8Value(property_name)); >> }, >> nullptr, // query >> nullptr, // deleter >> nullptr, // enumerator >> v8::External::New(this->isolate, (void *)data), >> v8::PropertyHandlerFlags::kNonMasking)); // <== Tried >> with and without this >> }; >> >> >> and prints out: IN GETTER CALLBACK111 foo >> >> I originally tried with the older API for string-only property names and >> had the same results. >> >> #define V8_MAJOR_VERSION 5 >> #define V8_MINOR_VERSION 6 >> #define V8_BUILD_NUMBER 0 >> #define V8_PATCH_LEVEL 0 >> >> on os x 10.11 clang 3.9 >> > -- > -- > v8-users mailing list > v8-u...@googlegroups.com <javascript:> > 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 v8-users+u...@googlegroups.com <javascript:>. > For more options, visit https://groups.google.com/d/optout. > > -- -- v8-users mailing list v8-users@googlegroups.com 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 v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.