from the docs: http://v8.paulfryzel.com/docs/master/namespacev8.html#ac135beae5f0c8b290255accb438f990e
Returns a non-empty handle if the interceptor intercepts the request so make sure you are returning an empty handle for properties your object shouldn't respond to. On Tue, Apr 4, 2017 at 1:10 AM, Danny Dorfman <wilderness...@gmail.com> wrote: > I just implemented all the callbacks, and I see that for "with" there are > calls to QueryProperty, which are not present in the no-with scenario. > Maybe I can take it from there. Thanks for the idea! > > On Tuesday, April 4, 2017 at 9:05:11 AM UTC+3, Zac Hansen wrote: >> >> I don't know for sure, but if you don't tell the interceptor that a isn't >> a property on CONS, then it thinks it is and then it finds cons_object.a >> but then you don't have a value for it, so it returns undefined. >> >> Have you fully implemented all 5 of the callbacks for >> setnamedpropertyhandler? >> maybe even just put some print statements in them to see which are called >> when and for what property names. >> >> On Mon, Apr 3, 2017 at 11:01 PM, Danny Dorfman <wilder...@gmail.com> >> wrote: >> >>> Yes, I use SetNamedPropertyHandler. However, I'd like to make the >>> following distinction: >>> If I am *not* inside "using", the handler for "a" should return >>> v8::Undefined (or some other preset value). >>> If I *am* inside "using", the handler should not return anything at >>> all, and let V8 determine the value. >>> Is that possible? >>> >>> >>> On Monday, April 3, 2017 at 10:51:57 PM UTC+3, Zac Hansen wrote: >>>> >>>> Are you using the objecttemplate's setnamedpropertyhandler call? if >>>> so, are you implementing all the callbacks to say that your CONS object >>>> doesn't have a property a? >>>> >>>> On Monday, April 3, 2017 at 7:25:25 AM UTC-7, Danny Dorfman wrote: >>>>> >>>>> Hello there, >>>>> >>>>> Is there a way for my interceptor to know that it's running under >>>>> "with", as in this example: >>>>> >>>>> var a = 10; >>>>> with (new CONS()) { do_something(a); } >>>>> >>>>> The problem is, that 'a' is intercepted by the new object, and is >>>>> rendered undefined. I would like it to use the external 'a' instead. >>>>> >>>>> Regards, >>>>> Danny >>>>> >>>> -- >>> -- >>> v8-users mailing list >>> v8-u...@googlegroups.com >>> http://groups.google.com/group/v8-users >>> --- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "v8-users" group. >>> To unsubscribe from this topic, visit https://groups.google.com/d/to >>> pic/v8-users/dJLWr6EF8kc/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> v8-users+u...@googlegroups.com. >>> 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 a topic in the > Google Groups "v8-users" group. > To unsubscribe from this topic, visit https://groups.google.com/d/ > topic/v8-users/dJLWr6EF8kc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > v8-users+unsubscr...@googlegroups.com. > 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.