You should always enter isolates _after_ you acquired a lock on it, not before. You do not need to use Enter directly: Isolate::Scope is RIAA-style wrapper around Isolate::Enter/Exit.
HTH, Dmitry On Tue, Apr 22, 2014 at 4:50 PM, Nozik <nozi...@gmail.com> wrote: > Hi all, > > I've upgraded an old V8 to an updated version and encountered the > following problem: > > I'm creating Isolates several times in the code, and then calling the > Locker. > > _isolate = Isolate::New(); >> _isolate->Enter(); >> Locker lock(_isolate); >> Isolate::Scope isolateScope(_isolate); > > > However I sometimes get an access violation exception in the Locker > constructor, which doesn't make any sense, since I've just created the > isolate... > > My questions are: > 1. Why am I getting these exceptions? > 2. Do I really need to use Enter() after creating the isolate? Is that the > way to control which Isolate is returned when calling Isolate::GetCurrent()? > 3. Generally, what are the precautions to be taken when using the same > Isolate in different threads? > > Thanks. > > -- > -- > v8-users mailing list > v8-users@googlegroups.com > http://groups.google.com/group/v8-users > --- > You received this message because you are subscribed to the Google Groups > "v8-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to v8-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- v8-users mailing list v8-users@googlegroups.com http://groups.google.com/group/v8-users --- You received this message because you are subscribed to the Google Groups "v8-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.