Can I cancel the effect of SetAccessor?

23 views
Skip to first unread message

Danny Dorfman

unread,
Jun 15, 2015, 9:51:54 AM6/15/15
to v8-u...@googlegroups.com
Hi there,

I work with V8 3.31.1. Is it possible to cancel the effect of v8::Object::SetAccessor()?
I tried calling the SetAccessor API again with NULL values for both getter/setter function, but this has no effect whatsoever.
The named accessor remains in effect as if nothing changed...

Regards,
Danny

Ben Noordhuis

unread,
Jun 15, 2015, 10:37:07 AM6/15/15
to v8-u...@googlegroups.com
I think you should be able to override it with
v8::Object::CreateDataProperty() (v8::Object::ForceSet() in older V8
versions), provided the object hasn't been frozen or the property made
non-configurable.

Danny Dorfman

unread,
Jun 15, 2015, 10:40:47 AM6/15/15
to v8-u...@googlegroups.com
I am afraid that this version of V8 does not contain a method named v8::Object::CreateDataProperty().
Maybe it went under a different name?
Reply all
Reply to author
Forward
0 new messages