I had the same issue and passing the copyable trait to the persistent 
handle as template argument seems to be the cleanest solution.

Persistent<Value, CopyablePersistentTraits<Value>> persistent(isolate, 
Undefined(isolate));

Am Mittwoch, 22. Januar 2014 19:59:58 UTC+1 schrieb Jochen Eisinger:
>
> Hey,
>
> alternatively, you can use Handle<>::New(isolate, persistent) to create a 
> new handle pointing to the same object which is safe to copy (assuming 
> proper usage of handle scopes).
>
> best
> -jochen
>
>
> On Wed, Jan 22, 2014 at 4:55 PM, Chris Adams 
> <[email protected]<javascript:>
> > wrote:
>
>> I've got it fixed, I replaced all instances of Handle::New with 
>> Local::New (it appears that Handle isn't a friend class to HandleScope, but 
>> Local is). The other issue I had which may or may not be related to this 
>> one, was the change that made Persistent handles non-copyable, I created a 
>> wrapper class for Persistent which held a pointer to a Persistent handle to 
>> fix this issue.
>>
>> Cheers.
>>
>>
>> On Tuesday, January 21, 2014 11:53:51 PM UTC-4, Chris Adams wrote:
>>>
>>> The samples (shell, etc) compile fine
>>>
>>> However after upgrading my project from a version of v8 from June '13 
>>> I'm left with this error which I can't resolve:
>>>
>>> 1>c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(5544): error C2248: 'v8::HandleScope::CreateHandle' 
>>> : cannot access protected member declared in class 'v8::HandleScope'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(837) : see declaration of 'v8::HandleScope::
>>> CreateHandle'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(817) : see declaration of 'v8::HandleScope'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(5539) : while compiling class template member function 
>>> 'v8::Handle<T> v8::Handle<T>::New(v8::Isolate *,T *)'
>>> 1>          with
>>> 1>          [
>>> 1>              T=v8::String
>>> 1>          ]
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(1023) : see reference to class template instantiation 
>>> 'v8::Handle<T>' being compiled
>>> 1>          with
>>> 1>          [
>>> 1>              T=v8::String
>>> 1>          ]
>>> 1>c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(5544): error C2248: 'v8::HandleScope::CreateHandle' 
>>> : cannot access protected member declared in class 'v8::HandleScope'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(837) : see declaration of 'v8::HandleScope::
>>> CreateHandle'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(817) : see declaration of 'v8::HandleScope'
>>> 1>          c:\program files (x86)\microsoft visual studio 
>>> 10.0\vc\include\v8.h(5539) : while compiling class template member function 
>>> 'v8::Handle<T> v8::Handle<T>::New(v8::Isolate *,T *)'
>>> 1>          with
>>> 1>          [
>>> 1>              T=v8::Object
>>> 1>          ]
>>> 1>          Engine\RELScripting.cpp(291) : see reference to class 
>>> template instantiation 'v8::Handle<T>' being compiled
>>> 1>          with
>>> 1>          [
>>> 1>              T=v8::Object
>>> 1>          ]
>>>
>>> Line 291 in RELScripting.cpp is:
>>>
>>> v8::Handle<v8::Object> obj;= 
>>> v8::Handle<v8::Object>::New(v8::Isolate::GetCurrent(), 
>>> mi->second);
>>>
>>> However the error referenced is always the first case where I use 
>>> v8::Handle::New in the file, mi->second is of type 
>>> v8::Persistent<v8::Object>
>>>
>>> Any help would be greatly appreciated, I find any similar issues already 
>>> discussed.
>>>
>>  -- 
>> -- 
>> v8-users mailing list
>> [email protected] <javascript:>
>> 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] <javascript:>.
>> 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/d/optout.

Reply via email to