Ok strictly speaking, you should enter isolate *before* entering handle
scope. The proper order is:
- lock the locker
- enter isolate
- do any operations that access isolate
and creating a HandleScope is an operation that accesses isolate.

Hope this helps,
Dmitry



On Fri, Jun 7, 2013 at 6:59 PM, papi <[email protected]> wrote:

>
>
> On Friday, June 7, 2013 7:51:34 PM UTC+3, Dmitry Lomov wrote:
>
>> Well you should really create a locker *before* you create a HandleScope.
>> On Jun 7, 2013 6:47 PM, "papi" <[email protected]> wrote:
>>
>>> Also, did you make sure that _all_ the code - including the code on main
>>>> thread - that you execute in gIsolate is protected by v8::Locker?
>>>
>>>
>>> Hmm, i get my problem.
>>>
>>> I made that class
>>> class HandleScopeThreadSafety
>>> {
>>> v::HandleScope handleScope;
>>>  v::Locker locker;
>>> public:
>>> HandleScopeThreadSafety(v::**Isolate* pIsolate)
>>> : handleScope(pIsolate),
>>>  locker(pIsolate)
>>> {}
>>> };
>>>
>>> and im just making an instance before i call something from v8. And no
>>> problem. Thx you!!!
>>>
>>> PS: About handlescope, i got an instance over the winapi message loop
>>> (its like a "global" handlescope) but i remove it cuz.... i dont know why i
>>> put it at the first place my bad hehe.
>>>
>>>
>>> Btw, there no predefined XMLHttpRequest, but why v8 needs ws32_2.lib ?
>>>
>>> --
>>> --
>>> v8-users mailing list
>>> [email protected]
>>>
>>> http://groups.google.com/**group/v8-users<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+u...@**googlegroups.com.
>>>
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>
> There the final  helper class
> class HandleScopeThreadSafety
> {
> v::Locker locker;
> v::HandleScope handleScope;
> v::Isolate::Scope enterExit;
> public:
> HandleScopeThreadSafety(v::Isolate* pIsolate) :
> locker(pIsolate), // lock
> handleScope(pIsolate), // create handle tracker
> enterExit(pIsolate) // enter
> {}
> };
>
> Thx you. :)
>
>>
>>>
>>  --
> --
> v8-users mailing list
> [email protected]
> 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 [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
v8-users mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to