Unzip initialization lists and constructors in JSCell hierarchy (7/7)
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 01:19:49 +0000 (01:19 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Sep 2011 01:19:49 +0000 (01:19 +0000)
commit1d26c72c91cde4918c349bd0761e4e1bbd41ed95
treef04d19241023cb2b525c61db0b9cb9ca27bf613d
parentde372f7763e82bd9e5bd3f2cc3af8bdbfc6e4942
Unzip initialization lists and constructors in JSCell hierarchy (7/7)
https://bugs.webkit.org/show_bug.cgi?id=68122

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

Completed the seventh and final level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

JSCallbackObject was missed in previous patches due to the fact that
it's non-obvious (at least to my script) that it is in the JSCell hierarchy, so
this is just a bit of retroactive cleanup.

* API/JSCallbackObject.h:
(JSC::JSCallbackObject::create):
* API/JSCallbackObjectFunctions.h:
(JSC::::JSCallbackObject):

Source/WebCore:

No new tests.

Completed the seventh and final level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

This consists of moving the finishCreation() method call into the create methods
of the sixth level of the hierarchy as was done in previous patches.

The special cases for JSAudioConstructor, JSOptionConstructor, and JSImageConstructor
were also lumped in and given finishCreation() methods that are called in their
create methods because we are at the end and want to avoid a trivial patch just
for moving their finishCreation() methods from their constructor to their create method.

* bindings/js/JSAudioConstructor.cpp:
(WebCore::JSAudioConstructor::JSAudioConstructor):
(WebCore::JSAudioConstructor::finishCreation):
* bindings/js/JSAudioConstructor.h:
(WebCore::JSAudioConstructor::create):
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
* bindings/js/JSDOMWindowBase.cpp:
(WebCore::JSDOMWindowBase::JSDOMWindowBase):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::JSImageConstructor):
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::create):
* bindings/js/JSOptionConstructor.cpp:
(WebCore::JSOptionConstructor::JSOptionConstructor):
(WebCore::JSOptionConstructor::finishCreation):
* bindings/js/JSOptionConstructor.h:
(WebCore::JSOptionConstructor::create):
* bindings/js/JSWorkerContextBase.cpp:
(WebCore::JSWorkerContextBase::JSWorkerContextBase):

The bindings generation script was also changed to move the finishCreation() call into the
create methods for descendants of JSWorkerContextBase and JSDOMWindowBase because those base
classes had it removed from their constructors.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CRuntimeMethod::create):
(JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
* bridge/jni/jsc/JavaInstanceJSC.cpp:
(JavaRuntimeMethod::create):
(JavaRuntimeMethod::JavaRuntimeMethod):
* bridge/objc/objc_instance.mm:
(ObjCRuntimeMethod::create):
(ObjCRuntimeMethod::ObjCRuntimeMethod):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
(JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod):
* bridge/qt/qt_runtime.h:
(JSC::Bindings::QtRuntimeMetaMethod::create):
(JSC::Bindings::QtRuntimeConnectionMethod::create):

Source/WebKit/mac:

Completed the seventh and final level of the refactoring to add finishCreation()
methods to all classes within the JSCell hierarchy with non-trivial
constructor bodies.

* Plugins/Hosted/ProxyInstance.mm:
(WebKit::ProxyRuntimeMethod::create):
(WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
* Plugins/Hosted/ProxyRuntimeObject.h:
(WebKit::ProxyRuntimeObject::create):
* Plugins/Hosted/ProxyRuntimeObject.mm:
(WebKit::ProxyRuntimeObject::ProxyRuntimeObject):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@95250 268f45cc-cd09-0410-ab3c-d52691b4dbfc
23 files changed:
Source/JavaScriptCore/API/JSCallbackObject.h
Source/JavaScriptCore/API/JSCallbackObjectFunctions.h
Source/JavaScriptCore/ChangeLog
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/JSAudioConstructor.cpp
Source/WebCore/bindings/js/JSAudioConstructor.h
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMWindowBase.cpp
Source/WebCore/bindings/js/JSImageConstructor.cpp
Source/WebCore/bindings/js/JSImageConstructor.h
Source/WebCore/bindings/js/JSOptionConstructor.cpp
Source/WebCore/bindings/js/JSOptionConstructor.h
Source/WebCore/bindings/js/JSWorkerContextBase.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bridge/c/c_instance.cpp
Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp
Source/WebCore/bridge/objc/objc_instance.mm
Source/WebCore/bridge/qt/qt_runtime.cpp
Source/WebCore/bridge/qt/qt_runtime.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm