WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
34606
[V8] Clean up code for getting a v8::FunctionTemplate
https://bugs.webkit.org/show_bug.cgi?id=34606
Summary
[V8] Clean up code for getting a v8::FunctionTemplate
Nate Chapin
Reported
2010-02-04 11:56:06 PST
Each generated V8 class has a private GetTemplate() function. V8ClassIndex is a friend of those classes, and it has a big, long, macro'ed switch statement that it uses to return the correct FunctionTemplate based on the passed in V8ClassIndex::WrapperType. It also creates a cache of these templates, in spite of the fact that each generated class already caches its own FunctionTemplate. To clean this up: 1. Make GetTemplate() public, un-friend V8ClassIndex 2. Remove the duplicate caching of FunctionTemplates 3. When the type of FunctionTemplate desired is known, call V8<classname>::GetTemplate() directly instead of using V8ClassIndex.
Attachments
patch
(17.20 KB, patch)
2010-02-04 12:02 PST
,
Nate Chapin
dglazkov
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Nate Chapin
Comment 1
2010-02-04 12:02:29 PST
Created
attachment 48158
[details]
patch
Dimitri Glazkov (Google)
Comment 2
2010-02-04 15:26:26 PST
Comment on
attachment 48158
[details]
patch sounds good. Are we going to rename GetTemplate() to template(), to match WebKit spirit?
Nate Chapin
Comment 3
2010-02-04 15:42:34 PST
If you'd like. This patch or a later one?
Dimitri Glazkov (Google)
Comment 4
2010-02-04 17:23:06 PST
l8r.
Nate Chapin
Comment 5
2010-02-05 08:31:41 PST
http://trac.webkit.org/changeset/54425
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug