As you know, Context::New method support to pass a global object the
the new context
/** Creates a new context.
*
* Returns a persistent handle to the newly allocated context. This
* persistent handle has to be disposed when the context is no
* longer used so the context can be garbage collected.
*/
static Persistent<Context> New(
ExtensionConfiguration* extensions = NULL,
Handle<ObjectTemplate> global_template =
Handle<ObjectTemplate>(),
Handle<Value> global_object = Handle<Value>());
I'm trying to pass a global object to Context::New method, but it
always fall into a ASSERT for JSGlobalProxy
#
# Fatal error in ..\..\src\bootstrapper.cc, line 626
# CHECK(global_object->IsJSGlobalProxy()) failed
#
I have checked v8 source code, but doesn't find how to create a object
as a JS global proxy object.
On the other hand, I can't use ObjectTemplate, because it only support
to add method, I must bind some data to the global object with its
internal fields.
Thanks, and happy Xmas :)
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users