I actually just ran into the exact same problem.  I have a temporary 
workaround, which is to wait until the global object is created, and then 
add all of the properties.  Not exactly ideal since it takes a really long 
time to do this when I create a new context.

I also tried to use SetAccessor and provide a getter, but this caused 
another error down the line in Genesis::TransferNamedProperties.  This is 
how the docs suggest doing it now for static properties.

I'm at a bit of a loss to understand how to fix this. 

On Wednesday, September 7, 2016 at 1:56:35 PM UTC-5, Pieter wrote:
>
> I am starting to look at upgrading our V8 integration library to build 
> against a more recent version of v8. After fixing some compiler errors I am 
> getting a runtime failure on the following line.
>
> https://github.com/EventStore/EventStore/blob/release-v4.0.0/src/EventStore.Projections.v8Integration/PreludeScript.cpp#L88
>
> result = v8::ObjectTemplate::New();
> v8::Handle<v8::Array> global_property_names = 
> prelude_result_object->GetPropertyNames();
>
> for (unsigned int i = 0; i < global_property_names->Length(); i++) 
> {
> //TODO: handle invalid keys in template object (non-string)
> v8::Handle<v8::String> global_property_name = 
> global_property_names->Get(i).As<v8::String>();
> v8::Handle<v8::Value> global_property_value = 
> prelude_result_object->Get(global_property_name);
>
> result->Set(global_property_name, global_property_value);
> }
>
> return S_OK;
>
> It would appear that v8::ObjectTemplate has changed behaviour, 
> v8::ObjectTemplate previously used to be able to take the function name and 
> the function as a v8::Value.
> Is there any guidance on how best to migrate/move this bit of code over so 
> that it functions as it previously did?
>
> For reference. The version of v8 this integration library was written 
> against is 3.24.10.
>
> Thank you in advance for your help!
>
>
>

-- 
-- 
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