2009/9/11 Stephan Beal <[email protected]>: > On Fri, Sep 11, 2009 at 10:39 AM, Erik Corry <[email protected]> wrote: >> >> 2009/9/10 krovosos <[email protected]>:> void foo() >> > { >> > v8::Locker locker; >> > some_code.Run(); // this javascript code calls cpp_foo () >> > // release lock on destructor call >> > } >> > >> > Handle<Value> cpp_foo(const Arguments& args) // called from V8 >> > { >> > string abc = to_string(args[0]); >> ... >> >> > some_else_code.Run(); >> > >> > } >> > >> >> This all looks right. If you use v8::Locker anywhere you have to use >> it everywhere, so the some_else_code.Run() must also be in a >> v8::Locker scope. > > Isn't that implicit here, because some_else_code() is triggered > by cpp_foo(),
Yes, you are right. I wasn't paying attention to the braces. -- Erik Corry, Software Engineer Google Denmark ApS. CVR nr. 28 86 69 84 c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018 Copenhagen K, Denmark. --~--~---------~--~----~------------~-------~--~----~ v8-users mailing list [email protected] http://groups.google.com/group/v8-users -~----------~----~----~----~------~----~------~--~---
