My favorites | Sign in
v8
Project Home Downloads Wiki Issues Source Code Search
New issue   Search
for
  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 haraken@chromium.org, Aug 9, 2012
To implement "static attributes" in the Web IDL spec (http://dev.w3.org/2006/webapi/WebIDL/#idl-static-attributes-and-operations), 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 https://bugs.webkit.org/show_bug.cgi?id=93488 for more details.

Sep 24, 2012
Project Member #1 arv@chromium.org
Well, FunctionTemplate should inherit ObjectTemplate. Functions are Objects too.
Jan 28, 2013
Project Member #2 mstarzinger@chromium.org
I'll take a look.
Owner: mstarzinger@chromium.org
Cc: svenpanne@chromium.org jochen@chromium.org
Labels: Type-FeatureRequest Priority-Medium
Jan 28, 2013
Project Member #3 mstarzinger@chromium.org
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 haraken@chromium.org
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 https://bugs.webkit.org/show_bug.cgi?id=93488). Although this is not the highest priority issue, this would be a topic we should keep in mind.

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

Powered by Google Project Hosting