Bug 27010 - Need to remove UsesManualToJSImplementation() in favor of CustomToJS
Summary: Need to remove UsesManualToJSImplementation() in favor of CustomToJS
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC OS X 10.5
: P2 Normal
Assignee: Andrew Wilson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-06 15:24 PDT by Andrew Wilson
Modified: 2009-07-10 12:15 PDT (History)
1 user (show)

See Also:


Attachments
Proposed patch (6.56 KB, patch)
2009-07-06 17:18 PDT, Andrew Wilson
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Wilson 2009-07-06 15:24:09 PDT
CodeGeneratorJS.pm has some hard-coded logic which determines whether a toJS() function should be defined in the JS binding header file, and whether an implementation should be automatically generated.

This logic is:

.h file: define toJS() if the class in question is a base class (no parent class) or if it has the GenerateToJS custom attribute.

.cpp file: automatically generate implementation of toJS() if the class in question is a base class, but is not a member of a hardcoded list in UsesManualToJSImplementation()

We should get rid of UsesManualToJSImplementation() in favor of a CustomToJS attribute - the presence of this attribute will cause the code generator to emit a toJS() definition in the generated .h file, but will not automatically generate an implementation in the .cpp file.
Comment 1 Andrew Wilson 2009-07-06 17:18:57 PDT
Created attachment 32334 [details]
Proposed patch
Comment 2 Darin Adler 2009-07-06 17:26:02 PDT
Comment on attachment 32334 [details]
Proposed patch

r=me assuming it build and tests pass
Comment 3 Dmitry Titov 2009-07-10 12:15:30 PDT
Landed: http://trac.webkit.org/changeset/45714