On Tue, Jun 7, 2011 at 7:50 AM, Charles Lowell <[email protected]>wrote:

> I noticed that if I initialize v8 in one thread, and then try and do
> *anything* in a different thread without using a v8::Locker (even
> ...


To expand a tiny bit on Mads' answer: if your library-level routines will
use a Locker, be sure that you main() (or pre-v8-setup) routine also
contains a Locker in place. If you don't, the lib-level routines will crash
with a v8 assertion (incorrect use of the Locker). When used in main() (or
equivalent), the Locker needs to be the first v8 routine/class used, with
the exception that V8::SetFlagsFromCommandLine() may (apparently) be legally
called before the Locker is in place. There is an example here:

http://code.google.com/p/v8-juice/source/browse/trunk/src/client/shell/shell.cc

<http://code.google.com/p/v8-juice/source/browse/trunk/src/client/shell/shell.cc>search
for "Locker".

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

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

Reply via email to