On Tuesday, October 24, 2017 at 3:40:31 AM UTC-7, Ben Noordhuis wrote: > > On Tue, Oct 24, 2017 at 5:53 AM, J Decker <d3c...@gmail.com <javascript:>> > wrote: > > > > On Thursday, August 7, 2014 at 3:52:53 PM UTC-7, Ben Noordhuis wrote: > >> > >> On Fri, Aug 8, 2014 at 12:10 AM, Flying Jester <foolki...@gmail.com> > >> wrote: > >> > What precisely is the difference between using SetAccessor and > >> > SetNativeDataProperty? > >> > >> Nothing, as far as I know. The order of arguments is different but > >> they have identical implementations. > > > > They are not exactly the same... I've been using SetNativeDataProperty, > > which works for getters, but when i started to use it for a setter, V8 > ended > > up setting a property on the object instead of calling the setter. > Changing > > to SetAccessor allows the setter to be called correctly. > > > > And while I realize this is a very old thread; it's about the only one > that > > shows up for 'SetNativeDataProperty vs SetAccessor' > > > > I can't find any other information that would indicate that > > setnativedataproperty shouldn't or doesn't work; other than my code. > > Blast from the past! > > I believe what I wrote still holds (or holds again) if you start V8 > with `--disable_old_api_accessors`. It's currently off by default but > that will likely change someday. >
That option makes SetAccessor setter not work. It creates a property on the object instead of calling the setter. psiTemplate2->PrototypeTemplate()->SetAccessor( String::NewFromUtf8( isolate, "text" ) , ControlObject::getControlText, ControlObject::setControlText ); So that's discouraging.... -- -- 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.