My favorites | Sign in
Project Home Downloads Wiki Issues Source Code Search
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 2281: FunctionTemplate should have SetAccessor()
11 people starred this issue and may be notified of changes. Back to list
Project Member Reported by, Aug 9, 2012
To implement "static attributes" in the Web IDL spec (, we need to set accessors on FunctionTemplate.

Currently Object and ObjectTemplate have SetAccessor() (and thus we can define attributes on objects), but Function and FunctionTemplate do not have SetAccessor() (and thus we cannot define attributes on interfaces).

See for more details.

Sep 24, 2012
Project Member #1
Well, FunctionTemplate should inherit ObjectTemplate. Functions are Objects too.
Jan 28, 2013
Project Member #2
I'll take a look.
Labels: Type-FeatureRequest Priority-Medium
Jan 28, 2013
Project Member #3
Unfortunately providing the full ObjectTemplate functionality on FunctionTemplate (or just SetAccessor for that matter) requires some significant changes to how we instantiate JSFunctions and JSObject from these templates. While I totally agree that conceptually a FunctionTemplate should inherit from ObjectTemplate conceptually, the implementation of that is different. The difference is mainly that there is not constructor function for JSFunctions, while there is one for JSObjects. And we use this constructor function to make sure accessors are installed properly.
Jan 28, 2013
Project Member #4
OK, thanks, I understand the situation. Actually the fact that FunctionTemplate does not inherit ObjectTemplate has been causing very hacky implementation or blocking new features of V8 bindings (other than Although this is not the highest priority issue, this would be a topic we should keep in mind.

Jul 17, 2013
Project Member #6
(No comment was entered for this change.)
Sep 5, 2013
Project Member #7
(No comment was entered for this change.)
Status: Fixed
Sign in to add a comment

Powered by Google Project Hosting