SetPrototype on a FunctionTemplate

40 views
Skip to first unread message

Francis Bouvier

unread,
Oct 26, 2023, 11:48:18 AM10/26/23
to v8-users
Hi,

Do you know how can I set the prototype of a FunctionTemplate?
I'm not speaking of the proto of the FunctionTemplate prototype but the proto of the FunctionTemplate itself.

Child.prototype.__proto__ === Parent.prototype // that's OK with FunctionTemplate.Inherit
Child.__proto__ === Parent // that's what I'm looking for

Right now I'm retrieving the Function object after the start of the Context and then I call SetPrototype on it.
It works but I'm not very happy with this solution because it's after the context start.
Do you know if there is a way to do it at the Template level ?

Thanks,
Francis

Toon Verwaest

unread,
Nov 3, 2023, 9:50:13 AM11/3/23
to v8-u...@googlegroups.com
Hi Francis,

I don't think there's currently a way to do so. That sounds like a reasonable feature request. Can you file a bug https://bugs.chromium.org/p/v8/issues?

cheers,
Toon

--
--
v8-users mailing list
v8-u...@googlegroups.com
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-users/998e271a-6dae-4a0d-883f-dc29716333f2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages