What am I doing wrong with this example C++ data wrap example?

29 views
Skip to first unread message

kent williams

unread,
Dec 20, 2016, 12:32:18 PM12/20/16
to v8-users
This gist is my test fixture for implementing several JS objects implemented in C++.


It's my best guess -- based on this mailing list, stack overflow etc -- of how implementing a JS type should work.

It is a very complicated wrapping around a dynamically allocated string, but working this way is what I kind of need to do; I'll be creating a JS object to call various third party library functions.

It isn't working right now; it gets as far as line 165:

   v8::Local<v8::Object> instance = instance_template->NewInstance(context).ToLocalChecked();

Which apparently causes some sort of silent exception ending the program in v8::internal::(anonymous namespace)::ProbeInstantiationsCache(v8::internal::Isolate (or _ZN2v88internal12_GLOBAL__N_124ProbeInstantiationsCacheEPNS0_7IsolateEi if you speak C++ mangle).


Reply all
Reply to author
Forward
0 new messages