> >> > 2) I fail to create a circular reference:
>
> >> > global->Set(v8::String::New("window"), global);
>
> > In browser environment, the global context is known as "window". In my
> > opinion, this means that there exists a property "window" of global
> > object, which referes to global object itself. In other words, one can
> > write (in Firebug's console for instance) "this == window" (and this
> > assertion holds). My goal is to create something similar in server-
> > side V8.
>
> It seems like it should work.  How is it failing?
>

# Fatal error in v8::Context::New()
# Could not initialize environment

Fortunately, I succeeded in this task. Instead of writing

global->Set(v8::String::New("self"), global);

which ends in error mentioned above, I am able to do

context->Global()->Set(v8::String::New("self"),context->Global());

which works.


Ondrej

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

Reply via email to