I'm new to v8 as well. As for the arguments, they can be treated as an array of Local<Value>'s..
There are also a few useful methods, like Length() and Callee() which are mapped from the javascript equivalent. If you need an example, check out shell.cc in the samples folder of the v8 package. It wraps a few c++ functions (print, etc) and binds them to the global object. On Feb 26, 1:56 pm, Stephan Beal <[email protected]> wrote: > Hi, all! > > i'm new to v8 (but old to SpiderMonkey) and i'm trying to figure out > how to port my ncurses and sqlite3 JS bindings from SpiderMonkey to > v8. The APIs are drastically different and i'm still getting my head > around some of v8's basics... > > Does Arguments::Data() return the Value which was passed to > FunctionTemplate::New(...,value,...)? If so, is that the (or one of > the) proper way(s) to tie a shared native-side object to a JS function > (e.g. some internal handler type for debugging, telemetry collection, > or whatever)? The API docs for those funcs/parameters are > unfortunately empty. > > On a related note: i haven't yet seen a way to tie a destructor to a > native object, such that it will be destroyed when its JS-side > representation is destroyed, or some way to be notified when a JS > object is destroyed (so that i can do the native-side destruction > there). How is this done in v8? --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
