Status: New
Owner: ----
New issue 2713 by [email protected]: help , ObjectTemplate.NewInstance
always return a empty object
http://code.google.com/p/v8/issues/detail?id=2713
I want to dymanic add a funtion to a object, so I use prototype, but
NewInstance always return a empty(null) object.
when I debug inside v8 code, failed in Execution::InstantiateObject
function!
738 Handle<Object> result = Call(isolate->instantiate_fun(),
739 isolate->js_builtins_object(),
740 ARRAY_SIZE(args),
741 args,
742 exc);
743 if (*exc) return Handle<JSObject>::null();
Can somebody tell me why? my code is as follows:
Handle<ObjectTemplate> leaktemplate = ObjectTemplate::New();
for(; !pFunction->strName.empty(); pFunction++)
{
leaktemplate->Set(pFunction->strName.c_str(),FunctionTemplate::New(pFunction->func));
}
Handle<Object> inst = leaktemplate->NewInstance(); // always return a empty
object
obj->SetPrototype(inst);
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.