Hi,

I am customizing ObjectTemplates so the objects have all the necessary
bindings.

Here is how I create the Object Template:

        Handle<ObjectTemplate> aTempl = ObjectTemplate::New();
    // Set method bindings
        aTempl->Set(String::New("trace"), v8::FunctionTemplate::New(Trace));
    .
    .

I cache the ObjectTempate to a static Persistent<ObjectTemplat> in my
class so I can avoid re-creating the template every time I use the
object.
                sObjectTemplate = Persistent<ObjectTemplate>::New(aTempl);

Later, when I try to create an instance of the object from within an
Isolate:

    Handle<Object> anInstance = sObjectTemplate->NewInstance();

the app crashes with an access violation in Handle<JSObject>
Execution::InstantiateObject.

I know I am doing something wrong, but what exactly? The code works
correctly when not using Isolates.

Is it possible to share ObjectTemplates among Isolates?

TIA,
DW

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

Reply via email to