You have to use Isolate::Enter or Isolate::Scope.

If you want to use the default isolate just acquire isolate lock with
Locker.

v8.h includes very detailed comments. Please read them for further
information:

http://code.google.com/p/v8/source/browse/trunk/include/v8.h#3510

--
Vyacheslav Egorov

On Mon, Oct 10, 2011 at 1:16 PM, Adrian Basheer <[email protected]>wrote:

> Hi,
>
> I am afraid I do not know how to enter an isolate (I don't remember it
> coming up in the v8 tutorial)...
>
> Can you help me please?
>
> Thanks!
>
> Adrian.
>
>
> On Mon, Oct 10, 2011 at 2:09 PM, Vyacheslav Egorov 
> <[email protected]>wrote:
>
>> You can not declare handle scope in a thread that does not yet own V8
>> Isolate. You should enter an Isolate first.
>>
>> --
>> Vyacheslav Egorov
>>
>>
>> On Mon, Oct 10, 2011 at 1:02 PM, Adrian <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> This is the exact, complete program, that is failing..
>>>
>>> class TestThread : public Thread::Thread
>>>
>>> {
>>>
>>> public:
>>>
>>>       TestThread(){};
>>>
>>>       void TestThread::run()
>>>
>>>       {
>>>
>>>         v8::HandleScope scope;//<--This failes
>>>
>>>       }
>>>
>>> };
>>>
>>>
>>> int main(int argc, const char* argv[])
>>>
>>> {
>>>
>>>   v8::HandleScope scope; //<--This works
>>>
>>>   TestThread mythread;
>>>
>>>   mythread.start();
>>>
>>>   mythread.waitDone();
>>>
>>> }
>>>
>>>
>>>  --
>>> v8-users mailing list
>>> [email protected]
>>> http://groups.google.com/group/v8-users
>>>
>>
>>  --
>> v8-users mailing list
>> [email protected]
>> http://groups.google.com/group/v8-users
>>
>
>  --
> v8-users mailing list
> [email protected]
> http://groups.google.com/group/v8-users
>

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

Reply via email to