Diff
Modified: trunk/Source/_javascript_Core/API/JSCallbackObject.h (95249 => 95250)
--- trunk/Source/_javascript_Core/API/JSCallbackObject.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/_javascript_Core/API/JSCallbackObject.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -134,11 +134,13 @@
{
ASSERT_UNUSED(globalObject, !structure->globalObject() || structure->globalObject() == globalObject);
JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, structure, classRef, data);
+ callbackObject->finishCreation(exec);
return callbackObject;
}
static JSCallbackObject* create(JSGlobalData& globalData, JSClassRef classRef, Structure* structure)
{
JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure);
+ callbackObject->finishCreation(globalData);
return callbackObject;
}
Modified: trunk/Source/_javascript_Core/API/JSCallbackObjectFunctions.h (95249 => 95250)
--- trunk/Source/_javascript_Core/API/JSCallbackObjectFunctions.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/_javascript_Core/API/JSCallbackObjectFunctions.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -54,7 +54,6 @@
: Parent(exec->globalData(), structure)
, m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
{
- finishCreation(exec);
}
// Global object constructor.
@@ -64,7 +63,6 @@
: Parent(globalData, structure)
, m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass)))
{
- finishCreation(globalData);
}
template <class Parent>
Modified: trunk/Source/_javascript_Core/ChangeLog (95249 => 95250)
--- trunk/Source/_javascript_Core/ChangeLog 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/_javascript_Core/ChangeLog 2011-09-16 01:19:49 UTC (rev 95250)
@@ -1,3 +1,23 @@
+2011-09-15 Mark Hahnenberg <mhahnenb...@apple.com>
+
+ Unzip initialization lists and constructors in JSCell hierarchy (7/7)
+ https://bugs.webkit.org/show_bug.cgi?id=68122
+
+ Reviewed by Geoffrey Garen.
+
+ 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):
+
2011-09-15 Filip Pizlo <fpi...@apple.com>
The DFG non-speculative JIT is no longer used and should be removed.
Modified: trunk/Source/WebCore/ChangeLog (95249 => 95250)
--- trunk/Source/WebCore/ChangeLog 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/ChangeLog 2011-09-16 01:19:49 UTC (rev 95250)
@@ -1,3 +1,68 @@
+2011-09-15 Mark Hahnenberg <mhahnenb...@apple.com>
+
+ Unzip initialization lists and constructors in JSCell hierarchy (7/7)
+ https://bugs.webkit.org/show_bug.cgi?id=68122
+
+ Reviewed by Geoffrey Garen.
+
+ 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):
+
2011-09-15 Kentaro Hara <hara...@google.com>
A single line must not be split into two pages.
Modified: trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -39,9 +39,14 @@
const ClassInfo JSAudioConstructor::s_info = { "AudioConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
-JSAudioConstructor::JSAudioConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
+JSAudioConstructor::JSAudioConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorWithDocument(structure, globalObject)
{
+}
+
+void JSAudioConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
+{
+ Base::finishCreation(globalObject);
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None);
putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontDelete | DontEnum);
Modified: trunk/Source/WebCore/bindings/js/JSAudioConstructor.h (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSAudioConstructor.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSAudioConstructor.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -40,7 +40,9 @@
static JSAudioConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
{
- return new (JSC::allocateCell<JSAudioConstructor>(*exec->heap())) JSAudioConstructor(exec, structure, globalObject);
+ JSAudioConstructor* constructor = new (JSC::allocateCell<JSAudioConstructor>(*exec->heap())) JSAudioConstructor(structure, globalObject);
+ constructor->finishCreation(exec, globalObject);
+ return constructor;
}
static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
@@ -51,7 +53,8 @@
static const JSC::ClassInfo s_info;
private:
- JSAudioConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
+ JSAudioConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
};
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -73,7 +73,6 @@
DOMConstructorWithDocument(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorObject(structure, globalObject)
{
- finishCreation(globalObject);
}
void finishCreation(JSDOMGlobalObject* globalObject)
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -48,7 +48,6 @@
, m_impl(window)
, m_shell(shell)
{
- finishCreation(globalData, shell);
}
void JSDOMWindowBase::finishCreation(JSGlobalData& globalData, JSDOMWindowShell* shell)
Modified: trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -34,9 +34,14 @@
const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
-JSImageConstructor::JSImageConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
+JSImageConstructor::JSImageConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorWithDocument(structure, globalObject)
{
+}
+
+void JSImageConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
+{
+ Base::finishCreation(globalObject);
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, globalObject), None);
}
Modified: trunk/Source/WebCore/bindings/js/JSImageConstructor.h (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSImageConstructor.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSImageConstructor.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -31,7 +31,9 @@
static JSImageConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
{
- return new (JSC::allocateCell<JSImageConstructor>(*exec->heap())) JSImageConstructor(exec, structure, globalObject);
+ JSImageConstructor* constructor = new (JSC::allocateCell<JSImageConstructor>(*exec->heap())) JSImageConstructor(structure, globalObject);
+ constructor->finishCreation(exec, globalObject);
+ return constructor;
}
static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
@@ -42,7 +44,8 @@
static const JSC::ClassInfo s_info;
private:
- JSImageConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
+ JSImageConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
};
Modified: trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -35,9 +35,14 @@
const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
-JSOptionConstructor::JSOptionConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
+JSOptionConstructor::JSOptionConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
: DOMConstructorWithDocument(structure, globalObject)
{
+}
+
+void JSOptionConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
+{
+ Base::finishCreation(globalObject);
ASSERT(inherits(&s_info));
putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None);
putDirect(exec->globalData(), exec->propertyNames().length, jsNumber(4), ReadOnly | DontDelete | DontEnum);
Modified: trunk/Source/WebCore/bindings/js/JSOptionConstructor.h (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSOptionConstructor.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSOptionConstructor.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -32,7 +32,9 @@
static JSOptionConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
{
- return new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(exec, structure, globalObject);
+ JSOptionConstructor* constructor = new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(structure, globalObject);
+ constructor->finishCreation(exec, globalObject);
+ return constructor;
}
static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
@@ -43,7 +45,8 @@
static const JSC::ClassInfo s_info;
private:
- JSOptionConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
+ JSOptionConstructor(JSC::Structure*, JSDOMGlobalObject*);
+ void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
};
Modified: trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp (95249 => 95250)
--- trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -52,7 +52,6 @@
: JSDOMGlobalObject(globalData, structure, normalWorld(globalData))
, m_impl(impl)
{
- finishCreation(globalData, this);
}
void JSWorkerContextBase::finishCreation(JSGlobalData& globalData, JSWorkerContextBase* thisValue)
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (95249 => 95250)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2011-09-16 01:19:49 UTC (rev 95250)
@@ -731,12 +731,14 @@
push(@headerContent, " static $className* create(JSC::JSGlobalData& globalData, JSC::Structure* structure, PassRefPtr<$implType> impl, JSDOMWindowShell* windowShell)\n");
push(@headerContent, " {\n");
push(@headerContent, " $className* ptr = new (JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl, windowShell);\n");
+ push(@headerContent, " ptr->finishCreation(globalData, windowShell);\n");
push(@headerContent, " return ptr;\n");
push(@headerContent, " }\n\n");
} elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) {
push(@headerContent, " static $className* create(JSC::JSGlobalData& globalData, JSC::Structure* structure, PassRefPtr<$implType> impl)\n");
push(@headerContent, " {\n");
push(@headerContent, " $className* ptr = new (JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl);\n");
+ push(@headerContent, " ptr->finishCreation(globalData, ptr);\n");
push(@headerContent, " return ptr;\n");
push(@headerContent, " }\n\n");
} else {
Modified: trunk/Source/WebCore/bridge/c/c_instance.cpp (95249 => 95250)
--- trunk/Source/WebCore/bridge/c/c_instance.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bridge/c/c_instance.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -118,7 +118,9 @@
// FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
// We need to pass in the right global object for "i".
Structure* domStructure = WebCore::deprecatedGetDOMStructure<CRuntimeMethod>(exec);
- return new (allocateCell<CRuntimeMethod>(*exec->heap())) CRuntimeMethod(exec, globalObject, domStructure, name, list);
+ CRuntimeMethod* method = new (allocateCell<CRuntimeMethod>(*exec->heap())) CRuntimeMethod(globalObject, domStructure, list);
+ method->finishCreation(exec->globalData(), name);
+ return method;
}
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
@@ -129,10 +131,9 @@
static const ClassInfo s_info;
private:
- CRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
+ CRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
: RuntimeMethod(globalObject, structure, list)
{
- finishCreation(exec->globalData(), name);
}
void finishCreation(JSGlobalData& globalData, const Identifier& name)
Modified: trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp (95249 => 95250)
--- trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -123,7 +123,9 @@
// FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
// We need to pass in the right global object for "i".
Structure* domStructure = WebCore::deprecatedGetDOMStructure<JavaRuntimeMethod>(exec);
- return new (allocateCell<JavaRuntimeMethod>(*exec->heap())) JavaRuntimeMethod(exec, globalObject, domStructure, name, list);
+ JavaRuntimeMethod* method = new (allocateCell<JavaRuntimeMethod>(*exec->heap())) JavaRuntimeMethod(globalObject, domStructure, list);
+ method->finishCreation(exec->globalData(), name);
+ return method;
}
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
@@ -134,10 +136,9 @@
static const ClassInfo s_info;
private:
- JavaRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
+ JavaRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
: RuntimeMethod(globalObject, structure, list)
{
- finishCreation(exec->globalData(), name);
}
void finishCreation(JSGlobalData& globalData, const Identifier& name)
Modified: trunk/Source/WebCore/bridge/objc/objc_instance.mm (95249 => 95250)
--- trunk/Source/WebCore/bridge/objc/objc_instance.mm 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bridge/objc/objc_instance.mm 2011-09-16 01:19:49 UTC (rev 95250)
@@ -178,7 +178,9 @@
// FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
// We need to pass in the right global object for "i".
Structure* domStructure = WebCore::deprecatedGetDOMStructure<ObjCRuntimeMethod>(exec);
- return new (allocateCell<ObjCRuntimeMethod>(*exec->heap())) ObjCRuntimeMethod(exec, globalObject, domStructure, name, list);
+ ObjCRuntimeMethod* method = new (allocateCell<ObjCRuntimeMethod>(*exec->heap())) ObjCRuntimeMethod(globalObject, domStructure, list);
+ method->finishCreation(exec->globalData(), name);
+ return method;
}
static Structure* createStructure(JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSValue prototype)
@@ -191,10 +193,9 @@
private:
typedef RuntimeMethod Base;
- ObjCRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
+ ObjCRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
: RuntimeMethod(globalObject, structure, list)
{
- finishCreation(exec->globalData(), name);
}
void finishCreation(JSGlobalData& globalData, const Identifier& name)
Modified: trunk/Source/WebCore/bridge/qt/qt_runtime.cpp (95249 => 95250)
--- trunk/Source/WebCore/bridge/qt/qt_runtime.cpp 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bridge/qt/qt_runtime.cpp 2011-09-16 01:19:49 UTC (rev 95250)
@@ -1425,10 +1425,9 @@
return index;
}
-QtRuntimeMetaMethod::QtRuntimeMetaMethod(ExecState* exec, Structure* structure, const Identifier& identifier, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature, bool allowPrivate)
+QtRuntimeMetaMethod::QtRuntimeMetaMethod(ExecState* exec, Structure* structure, const Identifier& identifier)
: QtRuntimeMethod (new QtRuntimeMetaMethodData(), exec, structure, identifier)
{
- finishCreation(exec, identifier, instance, index, signature, allowPrivate);
}
void QtRuntimeMetaMethod::finishCreation(ExecState* exec, const Identifier& identifier, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature, bool allowPrivate)
@@ -1575,10 +1574,9 @@
QMultiMap<QObject*, QtConnectionObject*> QtRuntimeConnectionMethod::connections;
-QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, Structure* structure, const Identifier& identifier, bool isConnect, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature)
+QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, Structure* structure, const Identifier& identifier)
: QtRuntimeMethod (new QtRuntimeConnectionMethodData(), exec, structure, identifier)
{
- finishCreation(exec, identifier, isConnect, instance, index, signature);
}
void QtRuntimeConnectionMethod::finishCreation(ExecState* exec, const Identifier& identifier, bool isConnect, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature)
Modified: trunk/Source/WebCore/bridge/qt/qt_runtime.h (95249 => 95250)
--- trunk/Source/WebCore/bridge/qt/qt_runtime.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebCore/bridge/qt/qt_runtime.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -156,10 +156,11 @@
public:
typedef QtRuntimeMethod Base;
- static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& n, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature, bool allowPrivate)
+ static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& name, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature, bool allowPrivate)
{
Structure* domStructure = WebCore::deprecatedGetDOMStructure<QtRuntimeMethod>(exec);
- QtRuntimeMetaMethod* method = new (allocateCell<QtRuntimeMetaMethod>(*exec->heap())) QtRuntimeMetaMethod(exec, domStructure, n, inst, index, signature, allowPrivate);
+ QtRuntimeMetaMethod* method = new (allocateCell<QtRuntimeMetaMethod>(*exec->heap())) QtRuntimeMetaMethod(exec, domStructure, name);
+ method->finishCreation(exec, name, instance, index, signature, allowPrivate);
return method;
}
@@ -173,7 +174,7 @@
QtRuntimeMetaMethodData* d_func() const {return reinterpret_cast<QtRuntimeMetaMethodData*>(d_ptr);}
private:
- QtRuntimeMetaMethod(ExecState*, Structure*, const Identifier&, PassRefPtr<QtInstance>, int index, const QByteArray&, bool allowPrivate);
+ QtRuntimeMetaMethod(ExecState*, Structure*, const Identifier&);
void finishCreation(ExecState*, const Identifier&, PassRefPtr<QtInstance>, int index, const QByteArray& signature, bool allowPrivate);
virtual CallType getCallData(CallData&);
@@ -188,10 +189,12 @@
public:
typedef QtRuntimeMethod Base;
- static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& n, bool isConnect, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature)
+ static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& name, bool isConnect, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature)
{
Structure* domStructure = WebCore::deprecatedGetDOMStructure<QtRuntimeMethod>(exec);
- return new (allocateCell<QtRuntimeConnectionMethod>(*exec->heap())) QtRuntimeConnectionMethod(exec, domStructure, n, isConnect, inst, index, signature);
+ QtRuntimeConnectionMethod* method = new (allocateCell<QtRuntimeConnectionMethod>(*exec->heap())) QtRuntimeConnectionMethod(exec, domStructure, name);
+ method->finishCreation(exec, name, isConnect, instance, index, signature);
+ return method;
}
virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
@@ -202,7 +205,7 @@
QtRuntimeConnectionMethodData* d_func() const {return reinterpret_cast<QtRuntimeConnectionMethodData*>(d_ptr);}
private:
- QtRuntimeConnectionMethod(ExecState*, Structure*, const Identifier&, bool isConnect, PassRefPtr<QtInstance>, int index, const QByteArray&);
+ QtRuntimeConnectionMethod(ExecState*, Structure*, const Identifier&);
void finishCreation(ExecState*, const Identifier&, bool isConnect, PassRefPtr<QtInstance>, int index, const QByteArray& signature);
virtual CallType getCallData(CallData&);
Modified: trunk/Source/WebKit/mac/ChangeLog (95249 => 95250)
--- trunk/Source/WebKit/mac/ChangeLog 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-09-16 01:19:49 UTC (rev 95250)
@@ -1,3 +1,22 @@
+2011-09-15 Mark Hahnenberg <mhahnenb...@apple.com>
+
+ Unzip initialization lists and constructors in JSCell hierarchy (7/7)
+ https://bugs.webkit.org/show_bug.cgi?id=68122
+
+ Reviewed by Geoffrey Garen.
+
+ 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):
+
2011-09-15 Kentaro Hara <hara...@google.com>
A single line must not be split into two pages.
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm (95249 => 95250)
--- trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm 2011-09-16 01:19:49 UTC (rev 95250)
@@ -186,7 +186,9 @@
// FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
// exec-globalData() is also likely wrong.
Structure* domStructure = deprecatedGetDOMStructure<ProxyRuntimeMethod>(exec);
- return new (allocateCell<ProxyRuntimeMethod>(*exec->heap())) ProxyRuntimeMethod(exec, globalObject, domStructure, name, list);
+ ProxyRuntimeMethod* method = new (allocateCell<ProxyRuntimeMethod>(*exec->heap())) ProxyRuntimeMethod(globalObject, domStructure, list);
+ method->finishCreation(exec->globalData(), name);
+ return method;
}
static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
@@ -197,10 +199,9 @@
static const ClassInfo s_info;
private:
- ProxyRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
+ ProxyRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
: RuntimeMethod(globalObject, structure, list)
{
- finishCreation(exec->globalData(), name);
}
void finishCreation(JSGlobalData& globalData, const Identifier& name)
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h (95249 => 95250)
--- trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h 2011-09-16 01:19:49 UTC (rev 95250)
@@ -44,7 +44,9 @@
// FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object.
// exec->globalData() is also likely wrong.
JSC::Structure* structure = WebCore::deprecatedGetDOMStructure<ProxyRuntimeObject>(exec);
- return new (JSC::allocateCell<ProxyRuntimeObject>(*exec->heap())) ProxyRuntimeObject(exec, globalObject, structure, instance);
+ ProxyRuntimeObject* object = new (JSC::allocateCell<ProxyRuntimeObject>(*exec->heap())) ProxyRuntimeObject(exec, globalObject, structure, instance);
+ object->finishCreation(globalObject);
+ return object;
}
virtual ~ProxyRuntimeObject();
Modified: trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm (95249 => 95250)
--- trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm 2011-09-16 01:17:37 UTC (rev 95249)
+++ trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm 2011-09-16 01:19:49 UTC (rev 95250)
@@ -39,7 +39,6 @@
ProxyRuntimeObject::ProxyRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<ProxyInstance> instance)
: RuntimeObject(exec, globalObject, structure, instance)
{
- finishCreation(globalObject);
}
void ProxyRuntimeObject::finishCreation(JSGlobalObject* globalObject)