On Sat, Nov 28, 2009 at 5:09 PM, Christian Plesner Hansen <
[email protected]> wrote:

> Try reading a property, invoking a method, or generally doing any
> nontrivial operation that involves an external.  If you're lucky the
> results will just be unpredictable but you probably don't have to try
> too many things before you find something that crashes the vm.


i believe there's a partial workaround, though: you can create an arbitrary
object and use SetHiddenField() (not SetInternalField(), which is different)
to store your external in it. Then JS won't ever get a handle to the
external, and you can extract it in your callback functions. The
HiddenField() mechanism also offers an additional level of safety, since you
can apply an arbitrary name to the field (as opposed to an internal field
_number_), which simplifies verification of the object's origin.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/

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

Reply via email to