Finally , I found it's because of the following line in 
Factory::CreateApiFunction

JSObject::AddProperty(handle(JSObject::cast(result->prototype())),
                          constructor_string(), result, DONT_ENUM);
many thanks!!! :)

在 2014年10月30日星期四UTC+8下午8时07分53秒,Shang Yu写道:
>
> Hi dear all,
> I'm trying the shell of v8
>
> >print.prototype.constructor
> function print() { [native code] }
>
> why it is not 
> function Object() { [native code] } ?
>
> in my understanding , print is instantiated from
> v8::FunctionTemplate::New(isolate, Print)
> this FunctionTemplate has no PrototypeTemplate , so print.prototype should 
> be {} (by apinative.js::line 63)
> {} is an instance of Object and its constructor is Object .
>
> What did I miss ?
>
> Many thanks !!!
>

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