hi!

> i don't see any immediately wrong with what you've done - i hope one
> of the more experienced v8'ers out there can answer it. i agree with
> Alex that having an external in the global object is a bit curious. As
> i understood (perhaps very incorrectly), the internal field count
> applies to new instances of the object's class.

But why is it curious to have an external on the global? The global
is an object template and becomes an object instance as all others
so..

> Aside from that: this approach to using Externals to tie native data
> *is* the official method provided by v8, but is a road filled with
> potholes and segfaults. If someone ever passes the wrong type of
> object to your function (or you somehow get a non-External), the cast
> will fail and the app will likely segfault. It is possible to use
> templates to make this operations typesafe and lookup tables to
> provide an extra layer of "is this REALLY an object of type type", and
> i've written an article on the topic which you can find here:

Hmm.. that sounds interesting though even after reading your article
I am not perfectly sure when that could happen? How could you ever
be able to "pass" something else into the Holder() value?

Alex
--~--~---------~--~----~------------~-------~--~----~
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to