I've been frustrated by v8::Object::New not accepting a prototype object as 
a parameter and it's been hinted strongly that using 
v8::Object::SetPrototype after object creation is a bad idea.  Now I'm left 
wondering if it would be reasonable to implement (and if it would be 
accepted if it worked) to add that functionality to v8::Object::New

Specifically:

static Local<Object> New(Isolate *isolate, Local<Object> prototype = 
Local<Object>, Local<Object>() propertiesObject=Local<Object>());

To line up with: 
 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/create
 
and not change the functionality of existing calls.

Also, while asking related questions earlier in the week, I was pointed at 
ObjectCreate in builtins.cc

https://github.com/v8/v8/blob/master/src/builtins.cc#L1705

I looked at it a bit and tried to move the code into v8.h/api.cc but I was 
quickly stymied by not understanding the relationship between v8::Object 
and v8::i::Object.  Is the code in builtins.cc the right path for this? 
 Also, is this a reasonable project for someone not intimately familiar 
with the v8 codebase and willing to put in a week's worth of time into 
learning and making the change or is this somehow much harder than it 
appears?


Thank you.

--Zac

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" 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