Changeset 95250 in webkit


Ignore:
Timestamp:
Sep 15, 2011 6:19:49 PM (13 years ago)
Author:
mhahnenberg@apple.com
Message:

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):

Location:
trunk/Source
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/API/JSCallbackObject.h

    r94929 r95250  
    135135        ASSERT_UNUSED(globalObject, !structure->globalObject() || structure->globalObject() == globalObject);
    136136        JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(*exec->heap())) JSCallbackObject(exec, structure, classRef, data);
     137        callbackObject->finishCreation(exec);
    137138        return callbackObject;
    138139    }
     
    140141    {
    141142        JSCallbackObject* callbackObject = new (allocateCell<JSCallbackObject>(globalData.heap)) JSCallbackObject(globalData, classRef, structure);
     143        callbackObject->finishCreation(globalData);
    142144        return callbackObject;
    143145    }
  • trunk/Source/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r94875 r95250  
    5555    , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(data, jsClass)))
    5656{
    57     finishCreation(exec);
    5857}
    5958
     
    6564    , m_callbackObjectData(adoptPtr(new JSCallbackObjectData(0, jsClass)))
    6665{
    67     finishCreation(globalData);
    6866}
    6967
  • trunk/Source/JavaScriptCore/ChangeLog

    r95240 r95250  
     12011-09-15  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Unzip initialization lists and constructors in JSCell hierarchy (7/7)
     4        https://bugs.webkit.org/show_bug.cgi?id=68122
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Completed the seventh and final level of the refactoring to add finishCreation()
     9        methods to all classes within the JSCell hierarchy with non-trivial
     10        constructor bodies.
     11
     12        JSCallbackObject was missed in previous patches due to the fact that
     13        it's non-obvious (at least to my script) that it is in the JSCell hierarchy, so
     14        this is just a bit of retroactive cleanup.
     15
     16        * API/JSCallbackObject.h:
     17        (JSC::JSCallbackObject::create):
     18        * API/JSCallbackObjectFunctions.h:
     19        (JSC::::JSCallbackObject):
     20
    1212011-09-15  Filip Pizlo  <fpizlo@apple.com>
    222
  • trunk/Source/WebCore/ChangeLog

    r95249 r95250  
     12011-09-15  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Unzip initialization lists and constructors in JSCell hierarchy (7/7)
     4        https://bugs.webkit.org/show_bug.cgi?id=68122
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        No new tests.
     9
     10        Completed the seventh and final level of the refactoring to add finishCreation()
     11        methods to all classes within the JSCell hierarchy with non-trivial
     12        constructor bodies.
     13
     14        This consists of moving the finishCreation() method call into the create methods
     15        of the sixth level of the hierarchy as was done in previous patches. 
     16
     17        The special cases for JSAudioConstructor, JSOptionConstructor, and JSImageConstructor
     18        were also lumped in and given finishCreation() methods that are called in their
     19        create methods because we are at the end and want to avoid a trivial patch just
     20        for moving their finishCreation() methods from their constructor to their create method.
     21
     22        * bindings/js/JSAudioConstructor.cpp:
     23        (WebCore::JSAudioConstructor::JSAudioConstructor):
     24        (WebCore::JSAudioConstructor::finishCreation):
     25        * bindings/js/JSAudioConstructor.h:
     26        (WebCore::JSAudioConstructor::create):
     27        * bindings/js/JSDOMBinding.h:
     28        (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
     29        * bindings/js/JSDOMWindowBase.cpp:
     30        (WebCore::JSDOMWindowBase::JSDOMWindowBase):
     31        * bindings/js/JSImageConstructor.cpp:
     32        (WebCore::JSImageConstructor::JSImageConstructor):
     33        (WebCore::JSImageConstructor::finishCreation):
     34        * bindings/js/JSImageConstructor.h:
     35        (WebCore::JSImageConstructor::create):
     36        * bindings/js/JSOptionConstructor.cpp:
     37        (WebCore::JSOptionConstructor::JSOptionConstructor):
     38        (WebCore::JSOptionConstructor::finishCreation):
     39        * bindings/js/JSOptionConstructor.h:
     40        (WebCore::JSOptionConstructor::create):
     41        * bindings/js/JSWorkerContextBase.cpp:
     42        (WebCore::JSWorkerContextBase::JSWorkerContextBase):
     43
     44        The bindings generation script was also changed to move the finishCreation() call into the
     45        create methods for descendants of JSWorkerContextBase and JSDOMWindowBase because those base
     46        classes had it removed from their constructors. 
     47
     48        * bindings/scripts/CodeGeneratorJS.pm:
     49        (GenerateHeader):
     50        * bridge/c/c_instance.cpp:
     51        (JSC::Bindings::CRuntimeMethod::create):
     52        (JSC::Bindings::CRuntimeMethod::CRuntimeMethod):
     53        * bridge/jni/jsc/JavaInstanceJSC.cpp:
     54        (JavaRuntimeMethod::create):
     55        (JavaRuntimeMethod::JavaRuntimeMethod):
     56        * bridge/objc/objc_instance.mm:
     57        (ObjCRuntimeMethod::create):
     58        (ObjCRuntimeMethod::ObjCRuntimeMethod):
     59        * bridge/qt/qt_runtime.cpp:
     60        (JSC::Bindings::QtRuntimeMetaMethod::QtRuntimeMetaMethod):
     61        (JSC::Bindings::QtRuntimeConnectionMethod::QtRuntimeConnectionMethod):
     62        * bridge/qt/qt_runtime.h:
     63        (JSC::Bindings::QtRuntimeMetaMethod::create):
     64        (JSC::Bindings::QtRuntimeConnectionMethod::create):
     65
    1662011-09-15  Kentaro Hara  <haraken@google.com>
    267
  • trunk/Source/WebCore/bindings/js/JSAudioConstructor.cpp

    r86785 r95250  
    4040const ClassInfo JSAudioConstructor::s_info = { "AudioConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
    4141
    42 JSAudioConstructor::JSAudioConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
     42JSAudioConstructor::JSAudioConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
    4343    : DOMConstructorWithDocument(structure, globalObject)
    4444{
     45}
     46
     47void JSAudioConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
     48{
     49    Base::finishCreation(globalObject);
    4550    ASSERT(inherits(&s_info));
    4651    putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None);
  • trunk/Source/WebCore/bindings/js/JSAudioConstructor.h

    r94929 r95250  
    4141        static JSAudioConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
    4242        {
    43             return new (JSC::allocateCell<JSAudioConstructor>(*exec->heap())) JSAudioConstructor(exec, structure, globalObject);
     43            JSAudioConstructor* constructor = new (JSC::allocateCell<JSAudioConstructor>(*exec->heap())) JSAudioConstructor(structure, globalObject);
     44            constructor->finishCreation(exec, globalObject);
     45            return constructor;
    4446        }
    4547
     
    5254
    5355    private:
    54         JSAudioConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
     56        JSAudioConstructor(JSC::Structure*, JSDOMGlobalObject*);
     57        void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
    5558        virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
    5659    };
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.h

    r95108 r95250  
    7474            : DOMConstructorObject(structure, globalObject)
    7575        {
    76             finishCreation(globalObject);
    7776        }
    7877
  • trunk/Source/WebCore/bindings/js/JSDOMWindowBase.cpp

    r95108 r95250  
    4949    , m_shell(shell)
    5050{
    51     finishCreation(globalData, shell);
    5251}
    5352
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.cpp

    r86785 r95250  
    3535const ClassInfo JSImageConstructor::s_info = { "ImageConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
    3636
    37 JSImageConstructor::JSImageConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
     37JSImageConstructor::JSImageConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
    3838    : DOMConstructorWithDocument(structure, globalObject)
    3939{
     40}
     41
     42void JSImageConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
     43{
     44    Base::finishCreation(globalObject);
    4045    ASSERT(inherits(&s_info));
    4146    putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLImageElementPrototype::self(exec, globalObject), None);
  • trunk/Source/WebCore/bindings/js/JSImageConstructor.h

    r94929 r95250  
    3232        static JSImageConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
    3333        {
    34             return new (JSC::allocateCell<JSImageConstructor>(*exec->heap())) JSImageConstructor(exec, structure, globalObject);
     34            JSImageConstructor* constructor = new (JSC::allocateCell<JSImageConstructor>(*exec->heap())) JSImageConstructor(structure, globalObject);
     35            constructor->finishCreation(exec, globalObject);
     36            return constructor;
    3537        }
    3638
     
    4345
    4446    private:
    45         JSImageConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
     47        JSImageConstructor(JSC::Structure*, JSDOMGlobalObject*);
     48        void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
    4649        virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
    4750    };
  • trunk/Source/WebCore/bindings/js/JSOptionConstructor.cpp

    r86785 r95250  
    3636const ClassInfo JSOptionConstructor::s_info = { "OptionConstructor", &DOMConstructorWithDocument::s_info, 0, 0 };
    3737
    38 JSOptionConstructor::JSOptionConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
     38JSOptionConstructor::JSOptionConstructor(Structure* structure, JSDOMGlobalObject* globalObject)
    3939    : DOMConstructorWithDocument(structure, globalObject)
    4040{
     41}
     42
     43void JSOptionConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
     44{
     45    Base::finishCreation(globalObject);
    4146    ASSERT(inherits(&s_info));
    4247    putDirect(exec->globalData(), exec->propertyNames().prototype, JSHTMLOptionElementPrototype::self(exec, globalObject), None);
  • trunk/Source/WebCore/bindings/js/JSOptionConstructor.h

    r94929 r95250  
    3333        static JSOptionConstructor* create(JSC::ExecState* exec, JSC::Structure* structure, JSDOMGlobalObject* globalObject)
    3434        {
    35             return new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(exec, structure, globalObject);
     35            JSOptionConstructor* constructor = new (JSC::allocateCell<JSOptionConstructor>(*exec->heap())) JSOptionConstructor(structure, globalObject);
     36            constructor->finishCreation(exec, globalObject);
     37            return constructor;
    3638        }
    3739
     
    4446
    4547    private:
    46         JSOptionConstructor(JSC::ExecState*, JSC::Structure*, JSDOMGlobalObject*);
     48        JSOptionConstructor(JSC::Structure*, JSDOMGlobalObject*);
     49        void finishCreation(JSC::ExecState*, JSDOMGlobalObject*);
    4750        virtual JSC::ConstructType getConstructData(JSC::ConstructData&);
    4851    };
  • trunk/Source/WebCore/bindings/js/JSWorkerContextBase.cpp

    r95108 r95250  
    5353    , m_impl(impl)
    5454{
    55     finishCreation(globalData, this);
    5655}
    5756
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r95108 r95250  
    732732        push(@headerContent, "    {\n");
    733733        push(@headerContent, "        $className* ptr = new (JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl, windowShell);\n");
     734        push(@headerContent, "        ptr->finishCreation(globalData, windowShell);\n");
    734735        push(@headerContent, "        return ptr;\n");
    735736        push(@headerContent, "    }\n\n");
     
    738739        push(@headerContent, "    {\n");
    739740        push(@headerContent, "        $className* ptr = new (JSC::allocateCell<$className>(globalData.heap)) ${className}(globalData, structure, impl);\n");
     741        push(@headerContent, "        ptr->finishCreation(globalData, ptr);\n");
    740742        push(@headerContent, "        return ptr;\n");
    741743        push(@headerContent, "    }\n\n");
  • trunk/Source/WebCore/bridge/c/c_instance.cpp

    r95108 r95250  
    119119        // We need to pass in the right global object for "i".
    120120        Structure* domStructure = WebCore::deprecatedGetDOMStructure<CRuntimeMethod>(exec);
    121         return new (allocateCell<CRuntimeMethod>(*exec->heap())) CRuntimeMethod(exec, globalObject, domStructure, name, list);
     121        CRuntimeMethod* method = new (allocateCell<CRuntimeMethod>(*exec->heap())) CRuntimeMethod(globalObject, domStructure, list);
     122        method->finishCreation(exec->globalData(), name);
     123        return method;
    122124    }
    123125
     
    130132
    131133private:
    132     CRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
     134    CRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
    133135        : RuntimeMethod(globalObject, structure, list)
    134136    {
    135         finishCreation(exec->globalData(), name);
    136137    }
    137138
  • trunk/Source/WebCore/bridge/jni/jsc/JavaInstanceJSC.cpp

    r95108 r95250  
    124124        // We need to pass in the right global object for "i".
    125125        Structure* domStructure = WebCore::deprecatedGetDOMStructure<JavaRuntimeMethod>(exec);
    126         return new (allocateCell<JavaRuntimeMethod>(*exec->heap())) JavaRuntimeMethod(exec, globalObject, domStructure, name, list);
     126        JavaRuntimeMethod* method = new (allocateCell<JavaRuntimeMethod>(*exec->heap())) JavaRuntimeMethod(globalObject, domStructure, list);
     127        method->finishCreation(exec->globalData(), name);
     128        return method;
    127129    }
    128130
     
    135137
    136138private:
    137     JavaRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
     139    JavaRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
    138140        : RuntimeMethod(globalObject, structure, list)
    139141    {
    140         finishCreation(exec->globalData(), name);
    141142    }
    142143
  • trunk/Source/WebCore/bridge/objc/objc_instance.mm

    r95108 r95250  
    179179        // We need to pass in the right global object for "i".
    180180        Structure* domStructure = WebCore::deprecatedGetDOMStructure<ObjCRuntimeMethod>(exec);
    181         return new (allocateCell<ObjCRuntimeMethod>(*exec->heap())) ObjCRuntimeMethod(exec, globalObject, domStructure, name, list);
     181        ObjCRuntimeMethod* method = new (allocateCell<ObjCRuntimeMethod>(*exec->heap())) ObjCRuntimeMethod(globalObject, domStructure, list);
     182        method->finishCreation(exec->globalData(), name);
     183        return method;
    182184    }
    183185
     
    192194    typedef RuntimeMethod Base;
    193195
    194     ObjCRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
     196    ObjCRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
    195197        : RuntimeMethod(globalObject, structure, list)
    196198    {
    197         finishCreation(exec->globalData(), name);
    198199    }
    199200
  • trunk/Source/WebCore/bridge/qt/qt_runtime.cpp

    r95117 r95250  
    14261426}
    14271427
    1428 QtRuntimeMetaMethod::QtRuntimeMetaMethod(ExecState* exec, Structure* structure, const Identifier& identifier, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature, bool allowPrivate)
     1428QtRuntimeMetaMethod::QtRuntimeMetaMethod(ExecState* exec, Structure* structure, const Identifier& identifier)
    14291429    : QtRuntimeMethod (new QtRuntimeMetaMethodData(), exec, structure, identifier)
    14301430{
    1431     finishCreation(exec, identifier, instance, index, signature, allowPrivate);
    14321431}
    14331432
     
    15761575QMultiMap<QObject*, QtConnectionObject*> QtRuntimeConnectionMethod::connections;
    15771576
    1578 QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, Structure* structure, const Identifier& identifier, bool isConnect, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature)
     1577QtRuntimeConnectionMethod::QtRuntimeConnectionMethod(ExecState* exec, Structure* structure, const Identifier& identifier)
    15791578    : QtRuntimeMethod (new QtRuntimeConnectionMethodData(), exec, structure, identifier)
    15801579{
    1581     finishCreation(exec, identifier, isConnect, instance, index, signature);
    15821580}
    15831581
  • trunk/Source/WebCore/bridge/qt/qt_runtime.h

    r95117 r95250  
    157157    typedef QtRuntimeMethod Base;
    158158
    159     static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& n, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature, bool allowPrivate)
     159    static QtRuntimeMetaMethod* create(ExecState* exec, const Identifier& name, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature, bool allowPrivate)
    160160    {
    161161        Structure* domStructure = WebCore::deprecatedGetDOMStructure<QtRuntimeMethod>(exec);
    162         QtRuntimeMetaMethod* method = new (allocateCell<QtRuntimeMetaMethod>(*exec->heap())) QtRuntimeMetaMethod(exec, domStructure, n, inst, index, signature, allowPrivate);
     162        QtRuntimeMetaMethod* method = new (allocateCell<QtRuntimeMetaMethod>(*exec->heap())) QtRuntimeMetaMethod(exec, domStructure, name);
     163        method->finishCreation(exec, name, instance, index, signature, allowPrivate);
    163164        return method;
    164165    }
     
    174175
    175176private:
    176     QtRuntimeMetaMethod(ExecState*, Structure*, const Identifier&, PassRefPtr<QtInstance>, int index, const QByteArray&, bool allowPrivate);
     177    QtRuntimeMetaMethod(ExecState*, Structure*, const Identifier&);
    177178    void finishCreation(ExecState*, const Identifier&, PassRefPtr<QtInstance>, int index, const QByteArray& signature, bool allowPrivate);
    178179
     
    189190    typedef QtRuntimeMethod Base;
    190191
    191     static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& n, bool isConnect, PassRefPtr<QtInstance> inst, int index, const QByteArray& signature)
     192    static QtRuntimeConnectionMethod* create(ExecState* exec, const Identifier& name, bool isConnect, PassRefPtr<QtInstance> instance, int index, const QByteArray& signature)
    192193    {
    193194        Structure* domStructure = WebCore::deprecatedGetDOMStructure<QtRuntimeMethod>(exec);
    194         return new (allocateCell<QtRuntimeConnectionMethod>(*exec->heap())) QtRuntimeConnectionMethod(exec, domStructure, n, isConnect, inst, index, signature);
     195        QtRuntimeConnectionMethod* method = new (allocateCell<QtRuntimeConnectionMethod>(*exec->heap())) QtRuntimeConnectionMethod(exec, domStructure, name);
     196        method->finishCreation(exec, name, isConnect, instance, index, signature);
     197        return method;
    195198    }
    196199
     
    203206
    204207private:
    205     QtRuntimeConnectionMethod(ExecState*, Structure*, const Identifier&, bool isConnect, PassRefPtr<QtInstance>, int index, const QByteArray&);
     208    QtRuntimeConnectionMethod(ExecState*, Structure*, const Identifier&);
    206209    void finishCreation(ExecState*, const Identifier&, bool isConnect, PassRefPtr<QtInstance>, int index, const QByteArray& signature);
    207210
  • trunk/Source/WebKit/mac/ChangeLog

    r95249 r95250  
     12011-09-15  Mark Hahnenberg  <mhahnenberg@apple.com>
     2
     3        Unzip initialization lists and constructors in JSCell hierarchy (7/7)
     4        https://bugs.webkit.org/show_bug.cgi?id=68122
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        Completed the seventh and final level of the refactoring to add finishCreation()
     9        methods to all classes within the JSCell hierarchy with non-trivial
     10        constructor bodies.
     11
     12        * Plugins/Hosted/ProxyInstance.mm:
     13        (WebKit::ProxyRuntimeMethod::create):
     14        (WebKit::ProxyRuntimeMethod::ProxyRuntimeMethod):
     15        * Plugins/Hosted/ProxyRuntimeObject.h:
     16        (WebKit::ProxyRuntimeObject::create):
     17        * Plugins/Hosted/ProxyRuntimeObject.mm:
     18        (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
     19
    1202011-09-15  Kentaro Hara  <haraken@google.com>
    221
  • trunk/Source/WebKit/mac/Plugins/Hosted/ProxyInstance.mm

    r95108 r95250  
    187187        // exec-globalData() is also likely wrong.
    188188        Structure* domStructure = deprecatedGetDOMStructure<ProxyRuntimeMethod>(exec);
    189         return new (allocateCell<ProxyRuntimeMethod>(*exec->heap())) ProxyRuntimeMethod(exec, globalObject, domStructure, name, list);
     189        ProxyRuntimeMethod* method = new (allocateCell<ProxyRuntimeMethod>(*exec->heap())) ProxyRuntimeMethod(globalObject, domStructure, list);
     190        method->finishCreation(exec->globalData(), name);
     191        return method;
    190192    }
    191193
     
    198200
    199201private:
    200     ProxyRuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, Bindings::MethodList& list)
     202    ProxyRuntimeMethod(JSGlobalObject* globalObject, Structure* structure, Bindings::MethodList& list)
    201203        : RuntimeMethod(globalObject, structure, list)
    202204    {
    203         finishCreation(exec->globalData(), name);
    204205    }
    205206
  • trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h

    r94929 r95250  
    4545        // exec->globalData() is also likely wrong.
    4646        JSC::Structure* structure = WebCore::deprecatedGetDOMStructure<ProxyRuntimeObject>(exec);
    47         return new (JSC::allocateCell<ProxyRuntimeObject>(*exec->heap())) ProxyRuntimeObject(exec, globalObject, structure, instance);
     47        ProxyRuntimeObject* object = new (JSC::allocateCell<ProxyRuntimeObject>(*exec->heap())) ProxyRuntimeObject(exec, globalObject, structure, instance);
     48        object->finishCreation(globalObject);
     49        return object;
    4850    }
    4951
  • trunk/Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm

    r94875 r95250  
    4040    : RuntimeObject(exec, globalObject, structure, instance)
    4141{
    42     finishCreation(globalObject);
    4342}
    4443
Note: See TracChangeset for help on using the changeset viewer.