Strange behavior of v8::Private

76 views
Skip to first unread message

Danny Dorfman

unread,
Apr 18, 2016, 3:48:21 AM4/18/16
to v8-users
Hello there,

I am trying to use the SetPrivate()/GetPrivate() pair of v8's Object, and I'm having trouble preparing the "key" part.
According to documentation, it should be of type Local<Private>, and there are two API functions that can possibly create it.
At first I tried using Local<Private>New(). Setting the value works, but getting the value will always yield v8::Undefined.
Then I tried using Local<Private>ForApi(). Now setting and getting works just fine, but there's a limitation:
if the key is created from a string that is all digits, the executable SEGFAULTs.

Am I doing it wrong? (My v8 engine is 4.9)

Regards,
Danny

Jochen Eisinger

unread,
Apr 19, 2016, 1:09:52 AM4/19/16
to v8-users

Can you please file a bug with a complete reproduction case?


--
--
v8-users mailing list
v8-u...@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+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Danny Dorfman

unread,
Apr 19, 2016, 1:45:50 AM4/19/16
to v8-users
Reply all
Reply to author
Forward
0 new messages