Unreviewed, rolling out r94627 and r94632.
authorossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Sep 2011 07:01:29 +0000 (07:01 +0000)
committerossy@webkit.org <ossy@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 7 Sep 2011 07:01:29 +0000 (07:01 +0000)
http://trac.webkit.org/changeset/94627
http://trac.webkit.org/changeset/94632
https://bugs.webkit.org/show_bug.cgi?id=67698

It broke tests on GTK and Qt (Requested by Ossy on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2011-09-07

Source/JavaScriptCore:

* API/JSCallbackConstructor.cpp:
(JSC::JSCallbackConstructor::JSCallbackConstructor):
* API/JSCallbackConstructor.h:
(JSC::JSCallbackConstructor::create):
* API/JSCallbackFunction.cpp:
(JSC::JSCallbackFunction::JSCallbackFunction):
* API/JSCallbackFunction.h:
* JavaScriptCore.exp:
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* debugger/DebuggerActivation.cpp:
(JSC::DebuggerActivation::create):
* debugger/DebuggerActivation.h:
* jsc.cpp:
(GlobalObject::constructorBody):
(GlobalObject::GlobalObject):
* runtime/ArrayConstructor.cpp:
(JSC::ArrayConstructor::ArrayConstructor):
* runtime/ArrayConstructor.h:
* runtime/ArrayPrototype.cpp:
(JSC::ArrayPrototype::ArrayPrototype):
* runtime/ArrayPrototype.h:
(JSC::ArrayPrototype::create):
* runtime/BooleanConstructor.cpp:
(JSC::BooleanConstructor::BooleanConstructor):
* runtime/BooleanConstructor.h:
* runtime/BooleanObject.cpp:
(JSC::BooleanObject::BooleanObject):
* runtime/BooleanObject.h:
(JSC::BooleanObject::create):
* runtime/BooleanPrototype.cpp:
(JSC::BooleanPrototype::BooleanPrototype):
* runtime/BooleanPrototype.h:
* runtime/DateConstructor.cpp:
(JSC::DateConstructor::DateConstructor):
* runtime/DateConstructor.h:
* runtime/DateInstance.cpp:
(JSC::DateInstance::DateInstance):
* runtime/DateInstance.h:
(JSC::DateInstance::create):
* runtime/DatePrototype.cpp:
(JSC::DatePrototype::DatePrototype):
* runtime/DatePrototype.h:
* runtime/Error.cpp:
(JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
* runtime/ErrorConstructor.cpp:
(JSC::ErrorConstructor::ErrorConstructor):
* runtime/ErrorConstructor.h:
(JSC::ErrorConstructor::create):
* runtime/ErrorPrototype.cpp:
(JSC::ErrorPrototype::ErrorPrototype):
* runtime/ErrorPrototype.h:
(JSC::ErrorPrototype::create):
* runtime/FunctionConstructor.cpp:
(JSC::FunctionConstructor::FunctionConstructor):
* runtime/FunctionConstructor.h:
* runtime/FunctionPrototype.cpp:
(JSC::FunctionPrototype::FunctionPrototype):
* runtime/FunctionPrototype.h:
* runtime/InternalFunction.cpp:
(JSC::InternalFunction::InternalFunction):
* runtime/InternalFunction.h:
* runtime/JSActivation.cpp:
(JSC::JSActivation::JSActivation):
* runtime/JSActivation.h:
(JSC::JSActivation::create):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::create):
(JSC::JSGlobalObject::JSGlobalObject):
* runtime/JSONObject.cpp:
(JSC::JSONObject::JSONObject):
* runtime/JSONObject.h:
(JSC::JSONObject::create):
* runtime/JSStaticScopeObject.h:
(JSC::JSStaticScopeObject::create):
(JSC::JSStaticScopeObject::JSStaticScopeObject):
* runtime/JSString.cpp:
(JSC::StringObject::create):
* runtime/MathObject.cpp:
(JSC::MathObject::MathObject):
* runtime/MathObject.h:
(JSC::MathObject::create):
* runtime/NativeErrorConstructor.cpp:
(JSC::NativeErrorConstructor::NativeErrorConstructor):
* runtime/NativeErrorConstructor.h:
(JSC::NativeErrorConstructor::constructorBody):
* runtime/NativeErrorPrototype.cpp:
(JSC::NativeErrorPrototype::NativeErrorPrototype):
(JSC::NativeErrorPrototype::constructorBody):
* runtime/NativeErrorPrototype.h:
* runtime/NumberConstructor.cpp:
(JSC::NumberConstructor::NumberConstructor):
* runtime/NumberConstructor.h:
* runtime/NumberObject.cpp:
(JSC::NumberObject::NumberObject):
* runtime/NumberObject.h:
(JSC::NumberObject::create):
* runtime/NumberPrototype.cpp:
(JSC::NumberPrototype::NumberPrototype):
* runtime/NumberPrototype.h:
* runtime/ObjectConstructor.cpp:
(JSC::ObjectConstructor::ObjectConstructor):
* runtime/ObjectConstructor.h:
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
(JSC::RegExpMatchesArray::RegExpMatchesArray):
* runtime/RegExpConstructor.h:
* runtime/RegExpMatchesArray.h:
(JSC::RegExpMatchesArray::create):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::RegExpObject):
* runtime/RegExpObject.h:
(JSC::RegExpObject::create):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::RegExpPrototype):
* runtime/StringConstructor.cpp:
(JSC::StringConstructor::StringConstructor):
* runtime/StringConstructor.h:
* runtime/StringObject.cpp:
(JSC::StringObject::StringObject):
* runtime/StringObject.h:
(JSC::StringObject::create):
* runtime/StringObjectThatMasqueradesAsUndefined.h:
(JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
* runtime/StringPrototype.cpp:
(JSC::StringPrototype::StringPrototype):
* runtime/StringPrototype.h:

Source/JavaScriptGlue:

* JSRun.cpp:
(JSGlueGlobalObject::JSGlueGlobalObject):

Source/WebCore:

* WebCore.exp.in:
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorObject::DOMConstructorObject):
* bindings/js/JSDOMGlobalObject.cpp:
(WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
* bindings/js/JSDOMGlobalObject.h:
* bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::create):
* bindings/js/JSDOMWindowShell.h:
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::JSDOMWrapper):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterface::JSTestInterface):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObj::JSTestObj):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
* bridge/c/CRuntimeObject.cpp:
(JSC::Bindings::CRuntimeObject::CRuntimeObject):
* bridge/c/CRuntimeObject.h:
* bridge/jni/jsc/JavaRuntimeObject.cpp:
(JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
* bridge/jni/jsc/JavaRuntimeObject.h:
* bridge/objc/ObjCRuntimeObject.h:
* bridge/objc/ObjCRuntimeObject.mm:
(JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
* bridge/objc/objc_runtime.h:
(JSC::Bindings::ObjcFallbackObjectImp::create):
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
* bridge/qt/qt_instance.cpp:
(JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
* bridge/qt/qt_pixmapruntime.cpp:
(JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
* bridge/qt/qt_runtime.cpp:
(JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
* bridge/qt/qt_runtime.h:
* bridge/runtime_array.cpp:
(JSC::RuntimeArray::RuntimeArray):
* bridge/runtime_array.h:
(JSC::RuntimeArray::create):
* bridge/runtime_method.cpp:
(JSC::RuntimeMethod::RuntimeMethod):
* bridge/runtime_method.h:
* bridge/runtime_object.cpp:
(JSC::Bindings::RuntimeObject::RuntimeObject):
* bridge/runtime_object.h:
(JSC::Bindings::RuntimeObject::create):

Source/WebKit/mac:

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

Source/WebKit2:

* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::JSNPMethod::JSNPMethod):
(WebKit::JSNPMethod::create):
* WebProcess/Plugins/Netscape/JSNPMethod.h:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::JSNPObject):
(WebKit::JSNPObject::create):
* WebProcess/Plugins/Netscape/JSNPObject.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@94644 268f45cc-cd09-0410-ab3c-d52691b4dbfc

112 files changed:
Source/JavaScriptCore/API/JSCallbackConstructor.cpp
Source/JavaScriptCore/API/JSCallbackConstructor.h
Source/JavaScriptCore/API/JSCallbackFunction.cpp
Source/JavaScriptCore/API/JSCallbackFunction.h
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.exp
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
Source/JavaScriptCore/debugger/DebuggerActivation.cpp
Source/JavaScriptCore/debugger/DebuggerActivation.h
Source/JavaScriptCore/jsc.cpp
Source/JavaScriptCore/runtime/ArrayConstructor.cpp
Source/JavaScriptCore/runtime/ArrayConstructor.h
Source/JavaScriptCore/runtime/ArrayPrototype.cpp
Source/JavaScriptCore/runtime/ArrayPrototype.h
Source/JavaScriptCore/runtime/BooleanConstructor.cpp
Source/JavaScriptCore/runtime/BooleanConstructor.h
Source/JavaScriptCore/runtime/BooleanObject.cpp
Source/JavaScriptCore/runtime/BooleanObject.h
Source/JavaScriptCore/runtime/BooleanPrototype.cpp
Source/JavaScriptCore/runtime/BooleanPrototype.h
Source/JavaScriptCore/runtime/DateConstructor.cpp
Source/JavaScriptCore/runtime/DateConstructor.h
Source/JavaScriptCore/runtime/DateInstance.cpp
Source/JavaScriptCore/runtime/DateInstance.h
Source/JavaScriptCore/runtime/DatePrototype.cpp
Source/JavaScriptCore/runtime/DatePrototype.h
Source/JavaScriptCore/runtime/Error.cpp
Source/JavaScriptCore/runtime/ErrorConstructor.cpp
Source/JavaScriptCore/runtime/ErrorConstructor.h
Source/JavaScriptCore/runtime/ErrorPrototype.cpp
Source/JavaScriptCore/runtime/ErrorPrototype.h
Source/JavaScriptCore/runtime/FunctionConstructor.cpp
Source/JavaScriptCore/runtime/FunctionConstructor.h
Source/JavaScriptCore/runtime/FunctionPrototype.cpp
Source/JavaScriptCore/runtime/FunctionPrototype.h
Source/JavaScriptCore/runtime/InternalFunction.cpp
Source/JavaScriptCore/runtime/InternalFunction.h
Source/JavaScriptCore/runtime/JSActivation.cpp
Source/JavaScriptCore/runtime/JSActivation.h
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/JSONObject.cpp
Source/JavaScriptCore/runtime/JSONObject.h
Source/JavaScriptCore/runtime/JSStaticScopeObject.h
Source/JavaScriptCore/runtime/JSString.cpp
Source/JavaScriptCore/runtime/MathObject.cpp
Source/JavaScriptCore/runtime/MathObject.h
Source/JavaScriptCore/runtime/NativeErrorConstructor.cpp
Source/JavaScriptCore/runtime/NativeErrorConstructor.h
Source/JavaScriptCore/runtime/NativeErrorPrototype.cpp
Source/JavaScriptCore/runtime/NativeErrorPrototype.h
Source/JavaScriptCore/runtime/NumberConstructor.cpp
Source/JavaScriptCore/runtime/NumberConstructor.h
Source/JavaScriptCore/runtime/NumberObject.cpp
Source/JavaScriptCore/runtime/NumberObject.h
Source/JavaScriptCore/runtime/NumberPrototype.cpp
Source/JavaScriptCore/runtime/NumberPrototype.h
Source/JavaScriptCore/runtime/ObjectConstructor.cpp
Source/JavaScriptCore/runtime/ObjectConstructor.h
Source/JavaScriptCore/runtime/RegExpConstructor.cpp
Source/JavaScriptCore/runtime/RegExpConstructor.h
Source/JavaScriptCore/runtime/RegExpMatchesArray.h
Source/JavaScriptCore/runtime/RegExpObject.cpp
Source/JavaScriptCore/runtime/RegExpObject.h
Source/JavaScriptCore/runtime/RegExpPrototype.cpp
Source/JavaScriptCore/runtime/StringConstructor.cpp
Source/JavaScriptCore/runtime/StringConstructor.h
Source/JavaScriptCore/runtime/StringObject.cpp
Source/JavaScriptCore/runtime/StringObject.h
Source/JavaScriptCore/runtime/StringObjectThatMasqueradesAsUndefined.h
Source/JavaScriptCore/runtime/StringPrototype.cpp
Source/JavaScriptCore/runtime/StringPrototype.h
Source/JavaScriptGlue/ChangeLog
Source/JavaScriptGlue/JSRun.cpp
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMGlobalObject.cpp
Source/WebCore/bindings/js/JSDOMGlobalObject.h
Source/WebCore/bindings/js/JSDOMWindowShell.cpp
Source/WebCore/bindings/js/JSDOMWindowShell.h
Source/WebCore/bindings/js/JSDOMWrapper.h
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bridge/c/CRuntimeObject.cpp
Source/WebCore/bridge/c/CRuntimeObject.h
Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.cpp
Source/WebCore/bridge/jni/jsc/JavaRuntimeObject.h
Source/WebCore/bridge/objc/ObjCRuntimeObject.h
Source/WebCore/bridge/objc/ObjCRuntimeObject.mm
Source/WebCore/bridge/objc/objc_runtime.h
Source/WebCore/bridge/objc/objc_runtime.mm
Source/WebCore/bridge/qt/qt_instance.cpp
Source/WebCore/bridge/qt/qt_pixmapruntime.cpp
Source/WebCore/bridge/qt/qt_runtime.cpp
Source/WebCore/bridge/qt/qt_runtime.h
Source/WebCore/bridge/runtime_array.cpp
Source/WebCore/bridge/runtime_array.h
Source/WebCore/bridge/runtime_method.cpp
Source/WebCore/bridge/runtime_method.h
Source/WebCore/bridge/runtime_object.cpp
Source/WebCore/bridge/runtime_object.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.h
Source/WebKit/mac/Plugins/Hosted/ProxyRuntimeObject.mm
Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPMethod.h
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.cpp
Source/WebKit2/WebProcess/Plugins/Netscape/JSNPObject.h

index 6a09934..9504ad8 100644 (file)
@@ -43,6 +43,7 @@ JSCallbackConstructor::JSCallbackConstructor(JSGlobalObject* globalObject, Struc
     , m_class(jsClass)
     , m_callback(callback)
 {
+    finishCreation(globalObject, jsClass);
 }
 
 void JSCallbackConstructor::finishCreation(JSGlobalObject* globalObject, JSClassRef jsClass)
index 0414a9e..59a5c44 100644 (file)
@@ -37,9 +37,7 @@ public:
 
     static JSCallbackConstructor* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSClassRef classRef, JSObjectCallAsConstructorCallback callback) 
     {
-        JSCallbackConstructor* constructor = new (allocateCell<JSCallbackConstructor>(*exec->heap())) JSCallbackConstructor(globalObject, structure, classRef, callback);
-        constructor->finishCreation(globalObject, classRef);
-        return constructor;
+        return new (allocateCell<JSCallbackConstructor>(*exec->heap())) JSCallbackConstructor(globalObject, structure, classRef, callback);
     }
     
     virtual ~JSCallbackConstructor();
index cc5561f..28b3419 100644 (file)
@@ -43,15 +43,9 @@ ASSERT_CLASS_FITS_IN_CELL(JSCallbackFunction);
 const ClassInfo JSCallbackFunction::s_info = { "CallbackFunction", &InternalFunction::s_info, 0, 0 };
 
 JSCallbackFunction::JSCallbackFunction(ExecState* exec, JSGlobalObject* globalObject, JSObjectCallAsFunctionCallback callback, const Identifier& name)
-    : InternalFunction(globalObject, globalObject->callbackFunctionStructure())
+    : InternalFunction(&exec->globalData(), globalObject, globalObject->callbackFunctionStructure(), name)
     , m_callback(callback)
 {
-    finishCreation(exec->globalData(), globalObject, name);
-}
-
-void JSCallbackFunction::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& name)
-{
-    Base::finishCreation(globalData, globalObject, name);
     ASSERT(inherits(&s_info));
 }
 
index f1ce5cc..7ebc788 100644 (file)
@@ -34,7 +34,6 @@ namespace JSC {
 class JSCallbackFunction : public InternalFunction {
 protected:
     JSCallbackFunction(ExecState*, JSGlobalObject*, JSObjectCallAsFunctionCallback, const Identifier& name);
-    void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier& name);
 
 public:
     typedef InternalFunction Base;
index 5700720..bbcb60c 100644 (file)
@@ -1,3 +1,139 @@
+2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r94627 and r94632.
+        http://trac.webkit.org/changeset/94627
+        http://trac.webkit.org/changeset/94632
+        https://bugs.webkit.org/show_bug.cgi?id=67698
+
+        It broke tests on GTK and Qt (Requested by Ossy on #webkit).
+
+        * API/JSCallbackConstructor.cpp:
+        (JSC::JSCallbackConstructor::JSCallbackConstructor):
+        * API/JSCallbackConstructor.h:
+        (JSC::JSCallbackConstructor::create):
+        * API/JSCallbackFunction.cpp:
+        (JSC::JSCallbackFunction::JSCallbackFunction):
+        * API/JSCallbackFunction.h:
+        * JavaScriptCore.exp:
+        * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
+        * debugger/DebuggerActivation.cpp:
+        (JSC::DebuggerActivation::create):
+        * debugger/DebuggerActivation.h:
+        * jsc.cpp:
+        (GlobalObject::constructorBody):
+        (GlobalObject::GlobalObject):
+        * runtime/ArrayConstructor.cpp:
+        (JSC::ArrayConstructor::ArrayConstructor):
+        * runtime/ArrayConstructor.h:
+        * runtime/ArrayPrototype.cpp:
+        (JSC::ArrayPrototype::ArrayPrototype):
+        * runtime/ArrayPrototype.h:
+        (JSC::ArrayPrototype::create):
+        * runtime/BooleanConstructor.cpp:
+        (JSC::BooleanConstructor::BooleanConstructor):
+        * runtime/BooleanConstructor.h:
+        * runtime/BooleanObject.cpp:
+        (JSC::BooleanObject::BooleanObject):
+        * runtime/BooleanObject.h:
+        (JSC::BooleanObject::create):
+        * runtime/BooleanPrototype.cpp:
+        (JSC::BooleanPrototype::BooleanPrototype):
+        * runtime/BooleanPrototype.h:
+        * runtime/DateConstructor.cpp:
+        (JSC::DateConstructor::DateConstructor):
+        * runtime/DateConstructor.h:
+        * runtime/DateInstance.cpp:
+        (JSC::DateInstance::DateInstance):
+        * runtime/DateInstance.h:
+        (JSC::DateInstance::create):
+        * runtime/DatePrototype.cpp:
+        (JSC::DatePrototype::DatePrototype):
+        * runtime/DatePrototype.h:
+        * runtime/Error.cpp:
+        (JSC::StrictModeTypeErrorFunction::StrictModeTypeErrorFunction):
+        * runtime/ErrorConstructor.cpp:
+        (JSC::ErrorConstructor::ErrorConstructor):
+        * runtime/ErrorConstructor.h:
+        (JSC::ErrorConstructor::create):
+        * runtime/ErrorPrototype.cpp:
+        (JSC::ErrorPrototype::ErrorPrototype):
+        * runtime/ErrorPrototype.h:
+        (JSC::ErrorPrototype::create):
+        * runtime/FunctionConstructor.cpp:
+        (JSC::FunctionConstructor::FunctionConstructor):
+        * runtime/FunctionConstructor.h:
+        * runtime/FunctionPrototype.cpp:
+        (JSC::FunctionPrototype::FunctionPrototype):
+        * runtime/FunctionPrototype.h:
+        * runtime/InternalFunction.cpp:
+        (JSC::InternalFunction::InternalFunction):
+        * runtime/InternalFunction.h:
+        * runtime/JSActivation.cpp:
+        (JSC::JSActivation::JSActivation):
+        * runtime/JSActivation.h:
+        (JSC::JSActivation::create):
+        * runtime/JSGlobalObject.h:
+        (JSC::JSGlobalObject::create):
+        (JSC::JSGlobalObject::JSGlobalObject):
+        * runtime/JSONObject.cpp:
+        (JSC::JSONObject::JSONObject):
+        * runtime/JSONObject.h:
+        (JSC::JSONObject::create):
+        * runtime/JSStaticScopeObject.h:
+        (JSC::JSStaticScopeObject::create):
+        (JSC::JSStaticScopeObject::JSStaticScopeObject):
+        * runtime/JSString.cpp:
+        (JSC::StringObject::create):
+        * runtime/MathObject.cpp:
+        (JSC::MathObject::MathObject):
+        * runtime/MathObject.h:
+        (JSC::MathObject::create):
+        * runtime/NativeErrorConstructor.cpp:
+        (JSC::NativeErrorConstructor::NativeErrorConstructor):
+        * runtime/NativeErrorConstructor.h:
+        (JSC::NativeErrorConstructor::constructorBody):
+        * runtime/NativeErrorPrototype.cpp:
+        (JSC::NativeErrorPrototype::NativeErrorPrototype):
+        (JSC::NativeErrorPrototype::constructorBody):
+        * runtime/NativeErrorPrototype.h:
+        * runtime/NumberConstructor.cpp:
+        (JSC::NumberConstructor::NumberConstructor):
+        * runtime/NumberConstructor.h:
+        * runtime/NumberObject.cpp:
+        (JSC::NumberObject::NumberObject):
+        * runtime/NumberObject.h:
+        (JSC::NumberObject::create):
+        * runtime/NumberPrototype.cpp:
+        (JSC::NumberPrototype::NumberPrototype):
+        * runtime/NumberPrototype.h:
+        * runtime/ObjectConstructor.cpp:
+        (JSC::ObjectConstructor::ObjectConstructor):
+        * runtime/ObjectConstructor.h:
+        * runtime/RegExpConstructor.cpp:
+        (JSC::RegExpConstructor::RegExpConstructor):
+        (JSC::RegExpMatchesArray::RegExpMatchesArray):
+        * runtime/RegExpConstructor.h:
+        * runtime/RegExpMatchesArray.h:
+        (JSC::RegExpMatchesArray::create):
+        * runtime/RegExpObject.cpp:
+        (JSC::RegExpObject::RegExpObject):
+        * runtime/RegExpObject.h:
+        (JSC::RegExpObject::create):
+        * runtime/RegExpPrototype.cpp:
+        (JSC::RegExpPrototype::RegExpPrototype):
+        * runtime/StringConstructor.cpp:
+        (JSC::StringConstructor::StringConstructor):
+        * runtime/StringConstructor.h:
+        * runtime/StringObject.cpp:
+        (JSC::StringObject::StringObject):
+        * runtime/StringObject.h:
+        (JSC::StringObject::create):
+        * runtime/StringObjectThatMasqueradesAsUndefined.h:
+        (JSC::StringObjectThatMasqueradesAsUndefined::StringObjectThatMasqueradesAsUndefined):
+        * runtime/StringPrototype.cpp:
+        (JSC::StringPrototype::StringPrototype):
+        * runtime/StringPrototype.h:
+
 2011-09-06  Xianzhu Wang  <wangxianzhu@chromium.org>
 
         Replace usages of Vector<UChar> with existing StringBuilder
index 62465fc..568e40f 100644 (file)
@@ -123,9 +123,8 @@ __ZN3JSC11ParserArena5resetEv
 __ZN3JSC11checkSyntaxEPNS_9ExecStateERKNS_10SourceCodeE
 __ZN3JSC11createErrorEPNS_9ExecStateERKNS_7UStringE
 __ZN3JSC11regExpFlagsERKNS_7UStringE
-__ZN3JSC12DateInstance14finishCreationERNS_12JSGlobalDataEd
 __ZN3JSC12DateInstance6s_infoE
-__ZN3JSC12DateInstanceC1EPNS_9ExecStateEPNS_9StructureE
+__ZN3JSC12DateInstanceC1EPNS_9ExecStateEPNS_9StructureEd
 __ZN3JSC12JSGlobalData10ClientDataD2Ev
 __ZN3JSC12JSGlobalData11jsArrayVPtrE
 __ZN3JSC12JSGlobalData12createLeakedENS_15ThreadStackTypeENS_8HeapSizeE
@@ -139,21 +138,19 @@ __ZN3JSC12JSGlobalData15dumpRegExpTraceEv
 __ZN3JSC12JSGlobalData22clearBuiltinStructuresEv
 __ZN3JSC12JSGlobalData6createENS_15ThreadStackTypeENS_8HeapSizeE
 __ZN3JSC12JSGlobalDataD1Ev
-__ZN3JSC12RegExpObject14finishCreationEPNS_14JSGlobalObjectE
 __ZN3JSC12RegExpObject6s_infoE
 __ZN3JSC12RegExpObjectC1EPNS_14JSGlobalObjectEPNS_9StructureEPNS_6RegExpE
 __ZN3JSC12SamplingTool5setupEv
 __ZN3JSC12SmallStrings17createEmptyStringEPNS_12JSGlobalDataE
 __ZN3JSC12SmallStrings27createSingleCharacterStringEPNS_12JSGlobalDataEh
 __ZN3JSC12StringObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC12StringObject14finishCreationERNS_12JSGlobalDataEPNS_8JSStringE
 __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
 __ZN3JSC12StringObject18getOwnPropertySlotEPNS_9ExecStateEjRNS_12PropertySlotE
 __ZN3JSC12StringObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
 __ZN3JSC12StringObject24getOwnPropertyDescriptorEPNS_9ExecStateERKNS_10IdentifierERNS_18PropertyDescriptorE
 __ZN3JSC12StringObject3putEPNS_9ExecStateERKNS_10IdentifierENS_7JSValueERNS_15PutPropertySlotE
 __ZN3JSC12StringObject6s_infoE
-__ZN3JSC12StringObjectC2ERNS_12JSGlobalDataEPNS_9StructureE
+__ZN3JSC12StringObjectC2ERNS_12JSGlobalDataEPNS_9StructureEPNS_8JSStringE
 __ZN3JSC13SamplingFlags4stopEv
 __ZN3JSC13SamplingFlags5startEv
 __ZN3JSC13SamplingFlags7s_flagsE
@@ -184,10 +181,9 @@ __ZN3JSC15WeakHandleOwner8finalizeENS_6HandleINS_7UnknownEEEPv
 __ZN3JSC15WeakHandleOwnerD2Ev
 __ZN3JSC15createTypeErrorEPNS_9ExecStateERKNS_7UStringE
 __ZN3JSC16InternalFunction12vtableAnchorEv
-__ZN3JSC16InternalFunction14finishCreationERNS_12JSGlobalDataEPNS_14JSGlobalObjectERKNS_10IdentifierE
 __ZN3JSC16InternalFunction4nameEPNS_9ExecStateE
 __ZN3JSC16InternalFunction6s_infoE
-__ZN3JSC16InternalFunctionC2EPNS_14JSGlobalObjectEPNS_9StructureE
+__ZN3JSC16InternalFunctionC2EPNS_12JSGlobalDataEPNS_14JSGlobalObjectEPNS_9StructureERKNS_10IdentifierE
 __ZN3JSC16JSVariableObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
 __ZN3JSC16JSVariableObject14symbolTableGetERKNS_10IdentifierERNS_18PropertyDescriptorE
 __ZN3JSC16JSVariableObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
@@ -199,8 +195,7 @@ __ZN3JSC17BytecodeGenerator21setDumpsGeneratedCodeEb
 __ZN3JSC17PropertyNameArray3addEPN3WTF10StringImplE
 __ZN3JSC17constructFunctionEPNS_9ExecStateEPNS_14JSGlobalObjectERKNS_7ArgListERKNS_10IdentifierERKNS_7UStringEi
 __ZN3JSC17createSyntaxErrorEPNS_9ExecStateERKNS_7UStringE
-__ZN3JSC18DebuggerActivation14finishCreationERNS_12JSGlobalDataEPNS_8JSObjectE
-__ZN3JSC18DebuggerActivationC1ERNS_12JSGlobalDataE
+__ZN3JSC18DebuggerActivation6createERNS_12JSGlobalDataEPNS_8JSObjectE
 __ZN3JSC18PropertyDescriptor11setWritableEb
 __ZN3JSC18PropertyDescriptor12setUndefinedEv
 __ZN3JSC18PropertyDescriptor13setDescriptorENS_7JSValueEj
index 70fe04a..93681b7 100644 (file)
@@ -3,11 +3,11 @@ EXPORTS
     ??0CString@WTF@@QAE@PBD@Z
     ??0CString@WTF@@QAE@PBDI@Z
     ??0Collator@WTF@@QAE@PBD@Z
-    ??0DateInstance@JSC@@IAE@PAVExecState@1@PAVStructure@1@@Z
+    ??0DateInstance@JSC@@IAE@PAVExecState@1@PAVStructure@1@N@Z
     ??0DefaultGCActivityCallback@JSC@@QAE@PAVHeap@1@@Z
     ??0DropAllLocks@JSLock@JSC@@QAE@W4JSLockBehavior@2@@Z
-    ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z 
-    ??0InternalFunction@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@@Z
+    ??0DynamicGlobalObjectScope@JSC@@QAE@AAVJSGlobalData@1@PAVJSGlobalObject@1@@Z  
+    ??0InternalFunction@JSC@@IAE@PAVJSGlobalData@1@PAVJSGlobalObject@1@PAVStructure@1@ABVIdentifier@1@@Z
     ??0JSArray@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
     ??0JSByteArray@JSC@@AAE@PAVExecState@1@PAVStructure@1@PAVByteArray@WTF@@@Z
     ??0JSFunction@JSC@@AAE@PAVExecState@1@PAVJSGlobalObject@1@PAVStructure@1@@Z
@@ -19,7 +19,7 @@ EXPORTS
     ??0RefCountedLeakCounter@WTF@@QAE@PBD@Z
     ??0RegExpObject@JSC@@IAE@PAVJSGlobalObject@1@PAVStructure@1@PAVRegExp@1@@Z
     ??0SHA1@WTF@@QAE@XZ
-    ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@@Z
+    ??0StringObject@JSC@@IAE@AAVJSGlobalData@1@PAVStructure@1@PAVJSString@1@@Z
     ??0Structure@JSC@@AAE@AAVJSGlobalData@1@VJSValue@1@ABVTypeInfo@1@IPBUClassInfo@1@@Z
     ??0ThreadCondition@WTF@@QAE@XZ
     ??0UString@JSC@@QAE@PBD@Z
@@ -175,14 +175,10 @@ EXPORTS
     ?fastZeroedMalloc@WTF@@YAPAXI@Z
     ?fillGetterPropertySlot@JSObject@JSC@@QAEXAAVPropertySlot@2@PAV?$WriteBarrierBase@W4Unknown@JSC@@@2@@Z
     ?finalize@WeakHandleOwner@JSC@@UAEXV?$Handle@W4Unknown@JSC@@@2@PAX@Z
-    ?finishCreation@DateInstance@JSC@@IAEXAAVJSGlobalData@2@N@Z
-    ?finishCreation@InternalFunction@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@ABVIdentifier@2@@Z
     ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@@Z
     ?finishCreation@JSArray@JSC@@IAEXAAVJSGlobalData@2@ABVArgList@2@@Z
     ?finishCreation@JSFunction@JSC@@IAEXPAVExecState@2@PAVJSGlobalObject@2@HABVIdentifier@2@PAVExecutableBase@2@@Z
     ?finishCreation@JSObjectWithGlobalObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSGlobalObject@2@@Z
-    ?finishCreation@RegExpObject@JSC@@IAEXPAVJSGlobalObject@2@@Z
-    ?finishCreation@StringObject@JSC@@IAEXAAVJSGlobalData@2@PAVJSString@2@@Z
     ?focus@Profile@JSC@@QAEXPBVProfileNode@2@@Z
     ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@H@Z
     ?from@Identifier@JSC@@SA?AV12@PAVExecState@2@I@Z
index af6a56f..a7101dc 100644 (file)
@@ -35,6 +35,13 @@ DebuggerActivation::DebuggerActivation(JSGlobalData& globalData)
 {
 }
 
+DebuggerActivation* DebuggerActivation::create(JSGlobalData& globalData, JSObject* object)
+{
+    DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData);
+    activation->finishCreation(globalData, object);
+    return activation;
+}
+
 void DebuggerActivation::finishCreation(JSGlobalData& globalData, JSObject* activation)
 {
     Base::finishCreation(globalData);
index 44b6267..92a8a0e 100644 (file)
@@ -34,13 +34,7 @@ namespace JSC {
     public:
         typedef JSNonFinalObject Base;
 
-        static DebuggerActivation* create(JSGlobalData& globalData, JSObject* object)
-        {
-            DebuggerActivation* activation = new (allocateCell<DebuggerActivation>(globalData.heap)) DebuggerActivation(globalData);
-            activation->finishCreation(globalData, object);
-            return activation;
-        }
-
+        static DebuggerActivation* create(JSGlobalData&, JSObject*);
         virtual void visitChildren(SlotVisitor&);
         virtual UString className() const;
         virtual bool getOwnPropertySlot(ExecState*, const Identifier& propertyName, PropertySlot&);
index e14f808..e103709 100644 (file)
@@ -157,9 +157,8 @@ public:
     virtual UString className() const { return "global"; }
 
 protected:
-    void finishCreation(JSGlobalData& globalData, const Vector<UString>& arguments)
+    void constructorBody(const Vector<UString>& arguments)
     {
-        Base::finishCreation(globalData, this);
         putDirectFunction(globalExec(), JSFunction::create(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "debug"), functionDebug));
         putDirectFunction(globalExec(), JSFunction::create(globalExec(), this, functionStructure(), 1, Identifier(globalExec(), "print"), functionPrint));
         putDirectFunction(globalExec(), JSFunction::create(globalExec(), this, functionStructure(), 0, Identifier(globalExec(), "quit"), functionQuit));
@@ -191,7 +190,7 @@ ASSERT_CLASS_FITS_IN_CELL(GlobalObject);
 GlobalObject::GlobalObject(JSGlobalData& globalData, Structure* structure, const Vector<UString>& arguments)
     : JSGlobalObject(globalData, structure)
 {
-    finishCreation(globalData, arguments);
+    constructorBody(arguments);
 }
 
 EncodedJSValue JSC_HOST_CALL functionPrint(ExecState* exec)
index 521fcbb..fd9e71d 100644 (file)
@@ -52,14 +52,8 @@ const ClassInfo ArrayConstructor::s_info = { "Function", &InternalFunction::s_in
 ASSERT_CLASS_FITS_IN_CELL(ArrayConstructor);
 
 ArrayConstructor::ArrayConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ArrayPrototype* arrayPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, arrayPrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, arrayPrototype);
-}
-
-void ArrayConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ArrayPrototype* arrayPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, arrayPrototype->classInfo()->className));
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, arrayPrototype, DontEnum | DontDelete | ReadOnly);
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
 }
index 186ab8e..d18d12a 100644 (file)
@@ -44,7 +44,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, ArrayPrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
index 42f41a6..99674bb 100644 (file)
@@ -117,6 +117,7 @@ const ClassInfo ArrayPrototype::s_info = {"Array", &JSArray::s_info, 0, ExecStat
 ArrayPrototype::ArrayPrototype(JSGlobalObject* globalObject, Structure* structure)
     : JSArray(globalObject->globalData(), structure)
 {
+    finishCreation(globalObject);
 }
 
 void ArrayPrototype::finishCreation(JSGlobalObject* globalObject)
index 75e6e80..6041a62 100644 (file)
@@ -35,9 +35,7 @@ namespace JSC {
 
         static ArrayPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
-            ArrayPrototype* prototype = new (allocateCell<ArrayPrototype>(*exec->heap())) ArrayPrototype(globalObject, structure);
-            prototype->finishCreation(globalObject);
-            return prototype;
+            return new (allocateCell<ArrayPrototype>(*exec->heap())) ArrayPrototype(globalObject, structure);
         }
         
         bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
index 2db4286..ef6240e 100644 (file)
@@ -29,14 +29,8 @@ namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(BooleanConstructor);
 
 BooleanConstructor::BooleanConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, BooleanPrototype* booleanPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, booleanPrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, booleanPrototype);
-}
-
-void BooleanConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, BooleanPrototype* booleanPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, booleanPrototype->classInfo()->className));
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, booleanPrototype, DontEnum | DontDelete | ReadOnly);
 
     // no. of arguments for constructor
index e973109..e7ea583 100644 (file)
@@ -36,9 +36,6 @@ namespace JSC {
             return new (allocateCell<BooleanConstructor>(*exec->heap())) BooleanConstructor(exec, globalObject, structure, boolPrototype);
         }
 
-    protected:
-        void finishCreation(ExecState*, JSGlobalObject*, BooleanPrototype*);
-
     private:
         BooleanConstructor(ExecState*, JSGlobalObject*, Structure*, BooleanPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
index cbddd0e..b9e33dc 100644 (file)
@@ -30,6 +30,7 @@ const ClassInfo BooleanObject::s_info = { "Boolean", &JSWrapperObject::s_info, 0
 BooleanObject::BooleanObject(JSGlobalData& globalData, Structure* structure)
     : JSWrapperObject(globalData, structure)
 {
+    finishCreation(globalData);
 }
 
 void BooleanObject::finishCreation(JSGlobalData& globalData)
index ced1ceb..0ffa425 100644 (file)
@@ -35,9 +35,7 @@ namespace JSC {
 
         static BooleanObject* create(JSGlobalData& globalData, Structure* structure)
         {
-            BooleanObject* boolean = new (allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure);
-            boolean->finishCreation(globalData);
-            return boolean;
+            return new (allocateCell<BooleanObject>(globalData.heap)) BooleanObject(globalData, structure);
         }
         
         static const ClassInfo s_info;
index 71db9c4..dd0194f 100644 (file)
@@ -52,12 +52,6 @@ ASSERT_CLASS_FITS_IN_CELL(BooleanPrototype);
 BooleanPrototype::BooleanPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     : BooleanObject(exec->globalData(), structure)
 {
-    finishCreation(exec, globalObject);
-}
-
-void BooleanPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
-{
-    Base::finishCreation(exec->globalData());
     setInternalValue(exec->globalData(), jsBoolean(false));
 
     ASSERT(inherits(&s_info));
index b737dff..14a1638 100644 (file)
@@ -42,7 +42,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | BooleanObject::StructureFlags;
         static const unsigned AnonymousSlotCount = BooleanObject::AnonymousSlotCount + 1;
 
index 27d0a9e..9946fd3 100644 (file)
@@ -74,14 +74,8 @@ const ClassInfo DateConstructor::s_info = { "Function", &InternalFunction::s_inf
 ASSERT_CLASS_FITS_IN_CELL(DateConstructor);
 
 DateConstructor::DateConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, DatePrototype* datePrototype)
-    : InternalFunction(globalObject, structure) 
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, datePrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, datePrototype);
-}
-
-void DateConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, DatePrototype* datePrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, datePrototype->classInfo()->className));
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, datePrototype, DontEnum | DontDelete | ReadOnly);
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(7), ReadOnly | DontEnum | DontDelete);
 }
index 7546574..1fe74cc 100644 (file)
@@ -44,7 +44,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, DatePrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
index 1b4add8..6df30d7 100644 (file)
@@ -37,6 +37,13 @@ const ClassInfo DateInstance::s_info = {"Date", &JSWrapperObject::s_info, 0, 0};
 DateInstance::DateInstance(ExecState* exec, Structure* structure)
     : JSWrapperObject(exec->globalData(), structure)
 {
+    finishCreation(exec->globalData());
+}
+
+DateInstance::DateInstance(ExecState* exec, Structure* structure, double time)
+    : JSWrapperObject(exec->globalData(), structure)
+{
+    finishCreation(exec->globalData(), time);
 }
 
 void DateInstance::finishCreation(JSGlobalData& globalData)
index bd36eb7..ebc7dbf 100644 (file)
@@ -31,6 +31,7 @@ namespace JSC {
 
     class DateInstance : public JSWrapperObject {
     protected:
+        DateInstance(ExecState*, Structure*, double);
         DateInstance(ExecState*, Structure*);
         void finishCreation(JSGlobalData&);
         void finishCreation(JSGlobalData&, double);
@@ -40,18 +41,13 @@ namespace JSC {
 
         static DateInstance* create(ExecState* exec, Structure* structure, double date)
         {
-            DateInstance* instance = new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure);
-            instance->finishCreation(exec->globalData(), date);
-            return instance;
+            return new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure, date);
         }
-
         static DateInstance* create(ExecState* exec, Structure* structure)
         {
-            DateInstance* instance = new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure);
-            instance->finishCreation(exec->globalData());
-            return instance;
+            return new (allocateCell<DateInstance>(*exec->heap())) DateInstance(exec, structure);
         }
-
+        
         double internalNumber() const { return internalValue().uncheckedGetNumber(); }
 
         static JS_EXPORTDATA const ClassInfo s_info;
index 176dc7e..dda2941 100644 (file)
@@ -432,12 +432,6 @@ const ClassInfo DatePrototype::s_info = {"Date", &DateInstance::s_info, 0, ExecS
 DatePrototype::DatePrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     : DateInstance(exec, structure)
 {
-    finishCreation(exec, globalObject);
-}
-
-void DatePrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
-{
-    Base::finishCreation(exec->globalData(), jsNaN());
     ASSERT(inherits(&s_info));
 
     // The constructor will be added later, after DateConstructor has been built.
index 1069085..b34c6b6 100644 (file)
@@ -49,7 +49,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | DateInstance::StructureFlags;
 
         COMPILE_ASSERT(!DateInstance::AnonymousSlotCount, DatePrototype_stomps_on_your_anonymous_slot);
index 50d4483..786750b 100644 (file)
@@ -168,10 +168,9 @@ JSObject* throwSyntaxError(ExecState* exec)
 class StrictModeTypeErrorFunction : public InternalFunction {
 private:
     StrictModeTypeErrorFunction(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& message)
-        : InternalFunction(globalObject, structure)
+        : InternalFunction(&exec->globalData(), globalObject, structure, exec->globalData().propertyNames->emptyIdentifier)
         , m_message(message)
     {
-        finishCreation(exec->globalData(), globalObject, exec->globalData().propertyNames->emptyIdentifier);
     }
 
 public:
index 938f40a..df112dd 100644 (file)
@@ -30,14 +30,8 @@ namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(ErrorConstructor);
 
 ErrorConstructor::ErrorConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ErrorPrototype* errorPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, errorPrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, errorPrototype);
-}
-
-void ErrorConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ErrorPrototype* errorPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, errorPrototype->classInfo()->className));
     // ECMA 15.11.3.1 Error.prototype
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, errorPrototype, DontEnum | DontDelete | ReadOnly);
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), DontDelete | ReadOnly | DontEnum);
index 944213f..3877a6d 100644 (file)
@@ -36,9 +36,6 @@ namespace JSC {
         {
             return new (allocateCell<ErrorConstructor>(*exec->heap())) ErrorConstructor(exec, globalObject, structure, errPrototype);
         }
-
-    protected:
-        void finishCreation(ExecState*, JSGlobalObject*, ErrorPrototype*);
         
     private:
         ErrorConstructor(ExecState*, JSGlobalObject*, Structure*, ErrorPrototype*);
index 2a9b9a9..6986752 100644 (file)
@@ -50,9 +50,10 @@ const ClassInfo ErrorPrototype::s_info = { "Error", &ErrorInstance::s_info, 0, E
 
 ASSERT_CLASS_FITS_IN_CELL(ErrorPrototype);
 
-ErrorPrototype::ErrorPrototype(ExecState* exec, Structure* structure)
+ErrorPrototype::ErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     : ErrorInstance(exec->globalData(), structure)
 {
+    finishCreation(exec, globalObject);
 }
 
 void ErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
index 93484c2..0d0fd30 100644 (file)
@@ -33,9 +33,7 @@ namespace JSC {
 
         static ErrorPrototype* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
-            ErrorPrototype* prototype = new (allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, structure);
-            prototype->finishCreation(exec, globalObject);
-            return prototype;
+            return new (allocateCell<ErrorPrototype>(*exec->heap())) ErrorPrototype(exec, globalObject, structure);
         }
         
         static const ClassInfo s_info;
@@ -46,7 +44,7 @@ namespace JSC {
         }
 
     protected:
-        ErrorPrototype(ExecState*, Structure*);
+        ErrorPrototype(ExecState*, JSGlobalObject*, Structure*);
         void finishCreation(ExecState*, JSGlobalObject*);
 
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ErrorInstance::StructureFlags;
index 8cf0d2a..50d9b5f 100644 (file)
@@ -38,14 +38,8 @@ namespace JSC {
 ASSERT_CLASS_FITS_IN_CELL(FunctionConstructor);
 
 FunctionConstructor::FunctionConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, FunctionPrototype* functionPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, functionPrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, functionPrototype);
-}
-
-void FunctionConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, FunctionPrototype* functionPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, functionPrototype->classInfo()->className));
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, functionPrototype, DontEnum | DontDelete | ReadOnly);
 
     // Number of arguments for constructor
index e97c53f..9c55d88 100644 (file)
@@ -38,7 +38,6 @@ namespace JSC {
 
     private:
         FunctionConstructor(ExecState*, JSGlobalObject*, Structure*, FunctionPrototype*);
-        void finishCreation(ExecState*, JSGlobalObject*, FunctionPrototype*);
         virtual ConstructType getConstructData(ConstructData&);
         virtual CallType getCallData(CallData&);
     };
index 00f8b25..96cd677 100644 (file)
@@ -38,14 +38,8 @@ static EncodedJSValue JSC_HOST_CALL functionProtoFuncApply(ExecState*);
 static EncodedJSValue JSC_HOST_CALL functionProtoFuncCall(ExecState*);
 
 FunctionPrototype::FunctionPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, exec->propertyNames().nullIdentifier)
 {
-    finishCreation(exec, globalObject, exec->propertyNames().nullIdentifier);
-}
-
-void FunctionPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name)
-{
-    Base::finishCreation(exec->globalData(), globalObject, name);
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(0), DontDelete | ReadOnly | DontEnum);
 }
 
index 9726c98..e70182f 100644 (file)
@@ -41,9 +41,6 @@ namespace JSC {
             return Structure::create(globalData, globalObject, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
         }
 
-    protected:
-        void finishCreation(ExecState*, JSGlobalObject*, const Identifier& name);
-
     private:
         FunctionPrototype(ExecState*, JSGlobalObject*, Structure*);
         virtual CallType getCallData(CallData&);
index 5e76461..07c0f7f 100644 (file)
@@ -41,9 +41,10 @@ InternalFunction::InternalFunction(VPtrStealingHackType)
 {
 }
 
-InternalFunction::InternalFunction(JSGlobalObject* globalObject, Structure* structure)
+InternalFunction::InternalFunction(JSGlobalData* globalData, JSGlobalObject* globalObject, Structure* structure, const Identifier& name)
     : JSObjectWithGlobalObject(globalObject, structure)
 {
+    finishCreation(*globalData, globalObject, name);
 }
 
 void InternalFunction::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& name)
index 3315640..7461e66 100644 (file)
@@ -52,7 +52,7 @@ namespace JSC {
         // Only used to allow us to determine the JSFunction vptr
         InternalFunction(VPtrStealingHackType);
 
-        InternalFunction(JSGlobalObject*, Structure*);
+        InternalFunction(JSGlobalData*, JSGlobalObject*, Structure*, const Identifier&);
 
         void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier& name);
 
index dbc967e..5c99d7a 100644 (file)
@@ -46,6 +46,7 @@ JSActivation::JSActivation(CallFrame* callFrame, FunctionExecutable* functionExe
     , m_requiresDynamicChecks(functionExecutable->usesEval())
     , m_argumentsRegister(functionExecutable->generatedBytecode().argumentsRegister())
 {
+    finishCreation(callFrame);
 }
 
 void JSActivation::finishCreation(CallFrame* callFrame)
index 701e218..7e8fd98 100644 (file)
@@ -48,9 +48,7 @@ namespace JSC {
 
         static JSActivation* create(JSGlobalData& globalData, CallFrame* callFrame, FunctionExecutable* funcExec)
         {
-            JSActivation* activation = new (allocateCell<JSActivation>(globalData.heap)) JSActivation(callFrame, funcExec);
-            activation->finishCreation(callFrame);
-            return activation;
+            return new (allocateCell<JSActivation>(globalData.heap)) JSActivation(callFrame, funcExec);
         }
 
         virtual ~JSActivation();
index d0a802e..330187e 100644 (file)
@@ -146,9 +146,7 @@ namespace JSC {
 
         static JSGlobalObject* create(JSGlobalData& globalData, Structure* structure)
         {
-            JSGlobalObject* globalObject = new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure);
-            globalObject->finishCreation(globalData, globalObject);
-            return globalObject;
+            return new (allocateCell<JSGlobalObject>(globalData.heap)) JSGlobalObject(globalData, structure);
         }
 
         static JS_EXPORTDATA const ClassInfo s_info;
@@ -161,6 +159,17 @@ namespace JSC {
             , m_weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
             , m_evalEnabled(true)
         {
+            finishCreation(globalData, this);
+        }
+
+        JSGlobalObject(JSGlobalData& globalData, Structure* structure, JSObject* thisValue)
+            : JSVariableObject(globalData, structure, &m_symbolTable, 0)
+            , m_registerArraySize(0)
+            , m_globalScopeChain()
+            , m_weakRandom(static_cast<unsigned>(randomNumber() * (std::numeric_limits<unsigned>::max() + 1.0)))
+            , m_evalEnabled(true)
+        {
+            finishCreation(globalData, thisValue);
         }
 
         void finishCreation(JSGlobalData& globalData, JSObject* thisValue)
index 1121468..173152b 100644 (file)
@@ -56,6 +56,7 @@ namespace JSC {
 JSONObject::JSONObject(JSGlobalObject* globalObject, Structure* structure)
     : JSObjectWithGlobalObject(globalObject, structure)
 {
+    finishCreation(globalObject);
 }
 
 void JSONObject::finishCreation(JSGlobalObject* globalObject)
index e69c3bc..c355169 100644 (file)
@@ -38,9 +38,7 @@ namespace JSC {
 
         static JSONObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
-            JSONObject* object = new (allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure);
-            object->finishCreation(globalObject);
-            return object;
+            return new (allocateCell<JSONObject>(*exec->heap())) JSONObject(globalObject, structure);
         }
         
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue prototype)
index 2256386..6cf3575 100644 (file)
@@ -36,9 +36,7 @@ namespace JSC{
 
         static JSStaticScopeObject* create(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes)
         {
-            JSStaticScopeObject* scopeObject = new (allocateCell<JSStaticScopeObject>(*exec->heap())) JSStaticScopeObject(exec);
-            scopeObject->finishCreation(exec, identifier, value, attributes);
-            return scopeObject;
+            return new (allocateCell<JSStaticScopeObject>(*exec->heap())) JSStaticScopeObject(exec, identifier, value, attributes);
         }
 
         virtual void visitChildren(SlotVisitor&);
@@ -61,9 +59,10 @@ namespace JSC{
         static const unsigned StructureFlags = IsEnvironmentRecord | OverridesGetOwnPropertySlot | OverridesVisitChildren | OverridesGetPropertyNames | JSVariableObject::StructureFlags;
 
     private:
-        JSStaticScopeObject(ExecState* exec)
+        JSStaticScopeObject(ExecState* exec, const Identifier& identifier, JSValue value, unsigned attributes)
             : JSVariableObject(exec->globalData(), exec->globalData().staticScopeStructure.get(), &m_symbolTable, reinterpret_cast<Register*>(&m_registerStore + 1))
         {
+            finishCreation(exec, identifier, value, attributes);
         }
         
         SymbolTable m_symbolTable;
index 47db1ff..bd355f7 100644 (file)
@@ -298,9 +298,7 @@ UString JSString::toString(ExecState* exec) const
 
 inline StringObject* StringObject::create(ExecState* exec, JSGlobalObject* globalObject, JSString* string)
 {
-    StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), globalObject->stringObjectStructure());
-    object->finishCreation(exec->globalData(), string);
-    return object;
+    return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), globalObject->stringObjectStructure(), string);
 }
 
 JSObject* JSString::toObject(ExecState* exec, JSGlobalObject* globalObject) const
index a4e7596..5ec56a3 100644 (file)
@@ -84,9 +84,10 @@ const ClassInfo MathObject::s_info = { "Math", &JSObjectWithGlobalObject::s_info
 @end
 */
 
-MathObject::MathObject(JSGlobalObject* globalObject, Structure* structure)
+MathObject::MathObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     : JSObjectWithGlobalObject(globalObject, structure)
 {
+    finishCreation(exec, globalObject);
 }
 
 void MathObject::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
index 78b62b3..e410a6e 100644 (file)
@@ -27,16 +27,14 @@ namespace JSC {
 
     class MathObject : public JSObjectWithGlobalObject {
     private:
-        MathObject(JSGlobalObject*, Structure*);
+        MathObject(ExecState*, JSGlobalObject*, Structure*);
 
     public:
         typedef JSObjectWithGlobalObject Base;
 
         static MathObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
         {
-            MathObject* object = new (allocateCell<MathObject>(*exec->heap())) MathObject(globalObject, structure);
-            object->finishCreation(exec, globalObject);
-            return object;
+            return new (allocateCell<MathObject>(*exec->heap())) MathObject(exec, globalObject, structure);
         }
         virtual bool getOwnPropertySlot(ExecState*, const Identifier&, PropertySlot&);
         virtual bool getOwnPropertyDescriptor(ExecState*, const Identifier&, PropertyDescriptor&);
index 537a457..8c66f7e 100644 (file)
@@ -33,9 +33,9 @@ ASSERT_CLASS_FITS_IN_CELL(NativeErrorConstructor);
 const ClassInfo NativeErrorConstructor::s_info = { "Function", &InternalFunction::s_info, 0, 0 };
 
 NativeErrorConstructor::NativeErrorConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, Structure* prototypeStructure, const UString& name)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, name))
 {
-    finishCreation(exec, globalObject, prototypeStructure, name);
+    constructorBody(exec, globalObject, prototypeStructure, name);
 }
 
 void NativeErrorConstructor::visitChildren(SlotVisitor& visitor)
index 1d4942d..a39d814 100644 (file)
@@ -49,9 +49,8 @@ namespace JSC {
         Structure* errorStructure() { return m_errorStructure.get(); }
 
     protected:
-        void finishCreation(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeStructure, const UString& name)
+        void constructorBody(ExecState* exec, JSGlobalObject* globalObject, Structure* prototypeStructure, const UString& name)
         {
-            Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, name));
             ASSERT(inherits(&s_info));
 
             NativeErrorPrototype* prototype = NativeErrorPrototype::create(exec, globalObject, prototypeStructure, name, this);
index 8a1530b..e5fe7cc 100644 (file)
@@ -30,17 +30,16 @@ namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(NativeErrorPrototype);
 
-NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& nameAndMessage, NativeErrorConstructor* constructor)
-    : ErrorPrototype(exec, structure)
+NativeErrorPrototype::NativeErrorPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const UString& name, NativeErrorConstructor* constructor)
+    : ErrorPrototype(exec, globalObject, structure)
 {
-    finishCreation(exec, globalObject, nameAndMessage, constructor);
+    constructorBody(exec, name, constructor);
 }
 
-inline void NativeErrorPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, const UString& nameAndMessage, NativeErrorConstructor* constructor)
+inline void NativeErrorPrototype::constructorBody(ExecState* exec, const UString& name, NativeErrorConstructor* constructor)
 {
-    Base::finishCreation(exec, globalObject);
-    putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, nameAndMessage), DontEnum);
-    putDirect(exec->globalData(), exec->propertyNames().message, jsString(exec, nameAndMessage), DontEnum);
+    putDirect(exec->globalData(), exec->propertyNames().name, jsString(exec, name), DontEnum);
+    putDirect(exec->globalData(), exec->propertyNames().message, jsEmptyString(exec), DontEnum);
     putDirect(exec->globalData(), exec->propertyNames().constructor, constructor, DontEnum);
 }
 
index d894ab4..33492bd 100644 (file)
@@ -39,7 +39,7 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, const UString& nameAndMessage, NativeErrorConstructor*);
+        void constructorBody(ExecState*, const UString& name, NativeErrorConstructor*);
     };
 
 } // namespace JSC
index dde6424..4b7f683 100644 (file)
@@ -55,14 +55,8 @@ const ClassInfo NumberConstructor::s_info = { "Function", &InternalFunction::s_i
 */
 
 NumberConstructor::NumberConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, NumberPrototype* numberPrototype)
-    : InternalFunction(globalObject, structure) 
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, numberPrototype->s_info.className))
 {
-    finishCreation(exec, globalObject, numberPrototype);
-}
-
-void NumberConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, NumberPrototype* numberPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, numberPrototype->s_info.className));
     ASSERT(inherits(&s_info));
 
     // Number.Prototype
index 91e50f2..75d337a 100644 (file)
@@ -50,7 +50,6 @@ namespace JSC {
         enum { NaNValue, NegInfinity, PosInfinity, MaxValue, MinValue };
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, NumberPrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
 
     private:
index cfbc23c..22676d0 100644 (file)
@@ -34,6 +34,7 @@ const ClassInfo NumberObject::s_info = { "Number", &JSWrapperObject::s_info, 0,
 NumberObject::NumberObject(JSGlobalData& globalData, Structure* structure)
     : JSWrapperObject(globalData, structure)
 {
+    finishCreation(globalData);
 }
 
 void NumberObject::finishCreation(JSGlobalData& globalData)
index e6cd4cf..9a05113 100644 (file)
@@ -35,9 +35,7 @@ namespace JSC {
 
         static NumberObject* create(JSGlobalData& globalData, Structure* structure)
         {
-            NumberObject* number = new (allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure);
-            number->finishCreation(globalData);
-            return number;
+            return new (allocateCell<NumberObject>(globalData.heap)) NumberObject(globalData, structure);
         }
 
         static const ClassInfo s_info;
index 75312b1..6b3a376 100644 (file)
@@ -72,12 +72,6 @@ ASSERT_CLASS_FITS_IN_CELL(NumberPrototype);
 NumberPrototype::NumberPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure)
     : NumberObject(exec->globalData(), structure)
 {
-    finishCreation(exec, globalObject);
-}
-
-void NumberPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject)
-{
-    Base::finishCreation(exec->globalData());
     setInternalValue(exec->globalData(), jsNumber(0));
 
     ASSERT(inherits(&s_info));
index 225b515..3eade6c 100644 (file)
@@ -42,7 +42,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | NumberObject::StructureFlags;
         static const unsigned AnonymousSlotCount = NumberObject::AnonymousSlotCount + 1;
 
index d47430e..c325fa0 100644 (file)
@@ -76,14 +76,8 @@ const ClassInfo ObjectConstructor::s_info = { "Function", &InternalFunction::s_i
 */
 
 ObjectConstructor::ObjectConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, ObjectPrototype* objectPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "Object"))
 {
-    finishCreation(exec, globalObject, objectPrototype);
-}
-
-void ObjectConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, ObjectPrototype* objectPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, "Object"));
     // ECMA 15.2.3.1
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, objectPrototype, DontEnum | DontDelete | ReadOnly);
     // no. of arguments for constructor
index 9fc7a06..383f402 100644 (file)
@@ -47,7 +47,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, ObjectPrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
index 8259b6e..c8a133b 100644 (file)
@@ -96,15 +96,9 @@ const ClassInfo RegExpConstructor::s_info = { "Function", &InternalFunction::s_i
 */
 
 RegExpConstructor::RegExpConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExpPrototype* regExpPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, "RegExp"))
     , d(adoptPtr(new RegExpConstructorPrivate))
 {
-    finishCreation(exec, globalObject, regExpPrototype);
-}
-
-void RegExpConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, RegExpPrototype* regExpPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, "RegExp"));
     ASSERT(inherits(&s_info));
 
     // ECMA 15.10.5.1 RegExp.prototype
@@ -114,9 +108,10 @@ void RegExpConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalOb
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(2), ReadOnly | DontDelete | DontEnum);
 }
 
-RegExpMatchesArray::RegExpMatchesArray(ExecState* exec)
+RegExpMatchesArray::RegExpMatchesArray(ExecState* exec, RegExpConstructorPrivate* data)
     : JSArray(exec->globalData(), exec->lexicalGlobalObject()->regExpMatchesArrayStructure())
 {
+    finishCreation(exec->globalData(), data);
 }
 
 void RegExpMatchesArray::finishCreation(JSGlobalData& globalData, RegExpConstructorPrivate* data)
index 02f64c5..c02d06d 100644 (file)
@@ -90,7 +90,6 @@ namespace JSC {
         JSValue getRightContext(ExecState*) const;
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, RegExpPrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | ImplementsHasInstance | InternalFunction::StructureFlags;
 
     private:
index ad94e07..87d59c7 100644 (file)
@@ -26,16 +26,14 @@ namespace JSC {
 
     class RegExpMatchesArray : public JSArray {
     private:
-        RegExpMatchesArray(ExecState*);
+        RegExpMatchesArray(ExecState*, RegExpConstructorPrivate*);
 
     public:
         typedef JSArray Base;
 
         static RegExpMatchesArray* create(ExecState* exec, RegExpConstructorPrivate* ctorPrivate)
         {
-            RegExpMatchesArray* regExp = new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec);
-            regExp->finishCreation(exec->globalData(), ctorPrivate);
-            return regExp;
+            return new (allocateCell<RegExpMatchesArray>(*exec->heap())) RegExpMatchesArray(exec, ctorPrivate);
         }
         virtual ~RegExpMatchesArray();
 
index aaa3ee0..841d939 100644 (file)
@@ -66,6 +66,7 @@ RegExpObject::RegExpObject(JSGlobalObject* globalObject, Structure* structure, R
     : JSObjectWithGlobalObject(globalObject, structure)
     , d(adoptPtr(new RegExpObjectData(globalObject->globalData(), this, regExp)))
 {
+    finishCreation(globalObject);
 }
 
 void RegExpObject::finishCreation(JSGlobalObject* globalObject)
index 03456db..e131fc5 100644 (file)
@@ -32,16 +32,12 @@ namespace JSC {
 
         static RegExpObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
         {
-            RegExpObject* object = new (allocateCell<RegExpObject>(*exec->heap())) RegExpObject(globalObject, structure, regExp);
-            object->finishCreation(globalObject);
-            return object;
+            return new (allocateCell<RegExpObject>(*exec->heap())) RegExpObject(globalObject, structure, regExp);
         }
         
         static RegExpObject* create(JSGlobalData& globalData, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
         {
-            RegExpObject* object = new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp);
-            object->finishCreation(globalObject);
-            return object;
+            return new (allocateCell<RegExpObject>(globalData.heap)) RegExpObject(globalObject, structure, regExp);
         }
 
         virtual ~RegExpObject();
index 91b8869..8bfc99f 100644 (file)
@@ -65,7 +65,6 @@ ASSERT_CLASS_FITS_IN_CELL(RegExpPrototype);
 RegExpPrototype::RegExpPrototype(ExecState*, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
     : RegExpObject(globalObject, structure, regExp)
 {
-    finishCreation(globalObject);
 }
 
 bool RegExpPrototype::getOwnPropertySlot(ExecState* exec, const Identifier& propertyName, PropertySlot &slot)
index af9abf5..1d3b1c7 100644 (file)
@@ -48,14 +48,8 @@ const ClassInfo StringConstructor::s_info = { "Function", &InternalFunction::s_i
 ASSERT_CLASS_FITS_IN_CELL(StringConstructor);
 
 StringConstructor::StringConstructor(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, StringPrototype* stringPrototype)
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, Identifier(exec, stringPrototype->classInfo()->className))
 {
-    finishCreation(exec, globalObject, stringPrototype);
-}
-
-void StringConstructor::finishCreation(ExecState* exec, JSGlobalObject* globalObject, StringPrototype* stringPrototype)
-{
-    Base::finishCreation(exec->globalData(), globalObject, Identifier(exec, stringPrototype->classInfo()->className));
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete);
     putDirectWithoutTransition(exec->globalData(), exec->propertyNames().length, jsNumber(1), ReadOnly | DontEnum | DontDelete);
 }
index 6dcd83d..a944e55 100644 (file)
@@ -44,7 +44,6 @@ namespace JSC {
         }
 
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, StringPrototype*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
     private:
index f6d69d1..b8fad9e 100644 (file)
@@ -29,9 +29,10 @@ ASSERT_CLASS_FITS_IN_CELL(StringObject);
 
 const ClassInfo StringObject::s_info = { "String", &JSWrapperObject::s_info, 0, 0 };
 
-StringObject::StringObject(JSGlobalData& globalData, Structure* structure)
+StringObject::StringObject(JSGlobalData& globalData, Structure* structure, JSString* string)
     : JSWrapperObject(globalData, structure)
 {
+    finishCreation(globalData, string);
 }
 
 void StringObject::finishCreation(JSGlobalData& globalData, JSString* string)
index 18afe72..a777220 100644 (file)
@@ -33,16 +33,12 @@ namespace JSC {
         static StringObject* create(ExecState* exec, Structure* structure)
         {
             JSString* string = jsEmptyString(exec);
-            StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure);  
-            object->finishCreation(exec->globalData(), string);
-            return object;
+            return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure, string);  
         }
         static StringObject* create(ExecState* exec, Structure* structure, const UString& str)
         {
             JSString* string = jsString(exec, str);
-            StringObject* object = new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure);
-            object->finishCreation(exec->globalData(), string);
-            return object;
+            return new (allocateCell<StringObject>(*exec->heap())) StringObject(exec->globalData(), structure, string);
         }
         static StringObject* create(ExecState*, JSGlobalObject*, JSString*);
 
@@ -66,7 +62,7 @@ namespace JSC {
     protected:
         void finishCreation(JSGlobalData&, JSString*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSWrapperObject::StructureFlags;
-        StringObject(JSGlobalData&, Structure*);
+        StringObject(JSGlobalData&, Structure*, JSString*);
     };
 
     StringObject* asStringObject(JSValue);
index e21f9a1..a04464a 100644 (file)
@@ -41,9 +41,8 @@ namespace JSC {
 
     private:
         StringObjectThatMasqueradesAsUndefined(ExecState* exec, Structure* structure, JSString* string)
-            : StringObject(exec->globalData(), structure)
+            : StringObject(exec->globalData(), structure, string)
         {
-            finishCreation(exec->globalData(), string);
         }
 
         static Structure* createStructure(JSGlobalData& globalData, JSGlobalObject* globalObject, JSValue proto) 
index 5903909..e14d977 100644 (file)
@@ -131,15 +131,9 @@ const ClassInfo StringPrototype::s_info = { "String", &StringObject::s_info, 0,
 */
 
 // ECMA 15.5.4
-StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSString* nameAndMessage)
-    : StringObject(exec->globalData(), structure)
+StringPrototype::StringPrototype(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, JSString* string)
+    : StringObject(exec->globalData(), structure, string)
 {
-    finishCreation(exec, globalObject, nameAndMessage);
-}
-
-void StringPrototype::finishCreation(ExecState* exec, JSGlobalObject* globalObject, JSString* nameAndMessage)
-{
-    Base::finishCreation(exec->globalData(), nameAndMessage);
     ASSERT(inherits(&s_info));
 
     putAnonymousValue(exec->globalData(), 0, globalObject);
index 651f9ac..6a0315f 100644 (file)
@@ -50,7 +50,6 @@ namespace JSC {
         static const ClassInfo s_info;
         
     protected:
-        void finishCreation(ExecState*, JSGlobalObject*, JSString*);
         static const unsigned StructureFlags = OverridesGetOwnPropertySlot | StringObject::StructureFlags;
 
         COMPILE_ASSERT(!StringObject::AnonymousSlotCount, StringPrototype_stomps_on_your_anonymous_slot);
index 9d8ceac..3047f26 100644 (file)
@@ -1,3 +1,15 @@
+2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r94627 and r94632.
+        http://trac.webkit.org/changeset/94627
+        http://trac.webkit.org/changeset/94632
+        https://bugs.webkit.org/show_bug.cgi?id=67698
+
+        It broke tests on GTK and Qt (Requested by Ossy on #webkit).
+
+        * JSRun.cpp:
+        (JSGlueGlobalObject::JSGlueGlobalObject):
+
 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
index bf22cbd..8c88f85 100644 (file)
@@ -38,7 +38,6 @@ JSGlueGlobalObject::JSGlueGlobalObject(JSGlobalData& globalData, Structure* stru
     , m_flags(flags)
     , m_userObjectStructure(globalData, userObjectStructure)
 {
-    finishCreation(globalData, this);
 }
 
 JSRun::JSRun(CFStringRef source, JSFlags inFlags)
index e2006f8..b9aa738 100644 (file)
@@ -1,3 +1,65 @@
+2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r94627 and r94632.
+        http://trac.webkit.org/changeset/94627
+        http://trac.webkit.org/changeset/94632
+        https://bugs.webkit.org/show_bug.cgi?id=67698
+
+        It broke tests on GTK and Qt (Requested by Ossy on #webkit).
+
+        * WebCore.exp.in:
+        * bindings/js/JSDOMBinding.h:
+        (WebCore::DOMConstructorObject::DOMConstructorObject):
+        * bindings/js/JSDOMGlobalObject.cpp:
+        (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
+        * bindings/js/JSDOMGlobalObject.h:
+        * bindings/js/JSDOMWindowShell.cpp:
+        (WebCore::JSDOMWindowShell::create):
+        * bindings/js/JSDOMWindowShell.h:
+        * bindings/js/JSDOMWrapper.h:
+        (WebCore::JSDOMWrapper::JSDOMWrapper):
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateImplementation):
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        (WebCore::JSTestInterface::JSTestInterface):
+        * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
+        (WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::JSTestObj::JSTestObj):
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        (WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
+        * bridge/c/CRuntimeObject.cpp:
+        (JSC::Bindings::CRuntimeObject::CRuntimeObject):
+        * bridge/c/CRuntimeObject.h:
+        * bridge/jni/jsc/JavaRuntimeObject.cpp:
+        (JSC::Bindings::JavaRuntimeObject::JavaRuntimeObject):
+        * bridge/jni/jsc/JavaRuntimeObject.h:
+        * bridge/objc/ObjCRuntimeObject.h:
+        * bridge/objc/ObjCRuntimeObject.mm:
+        (JSC::Bindings::ObjCRuntimeObject::ObjCRuntimeObject):
+        * bridge/objc/objc_runtime.h:
+        (JSC::Bindings::ObjcFallbackObjectImp::create):
+        * bridge/objc/objc_runtime.mm:
+        (JSC::Bindings::ObjcFallbackObjectImp::ObjcFallbackObjectImp):
+        * bridge/qt/qt_instance.cpp:
+        (JSC::Bindings::QtRuntimeObject::QtRuntimeObject):
+        * bridge/qt/qt_pixmapruntime.cpp:
+        (JSC::Bindings::QtPixmapRuntimeObject::QtPixmapRuntimeObject):
+        * bridge/qt/qt_runtime.cpp:
+        (JSC::Bindings::QtRuntimeMethod::QtRuntimeMethod):
+        * bridge/qt/qt_runtime.h:
+        * bridge/runtime_array.cpp:
+        (JSC::RuntimeArray::RuntimeArray):
+        * bridge/runtime_array.h:
+        (JSC::RuntimeArray::create):
+        * bridge/runtime_method.cpp:
+        (JSC::RuntimeMethod::RuntimeMethod):
+        * bridge/runtime_method.h:
+        * bridge/runtime_object.cpp:
+        (JSC::Bindings::RuntimeObject::RuntimeObject):
+        * bridge/runtime_object.h:
+        (JSC::Bindings::RuntimeObject::create):
+
 2011-08-31  Yury Semikhatsky  <yurys@chromium.org>
 
         fast/workers/worker-script-error.html fails on Chromium after r94061
index d551e4d..c965b0e 100644 (file)
@@ -1646,7 +1646,6 @@ __ZN3JSC13RuntimeMethodC2EPNS_9ExecStateEPNS_14JSGlobalObjectEPNS_9StructureERKN
 __ZN3JSC8Bindings10RootObjectD1Ev
 __ZN3JSC8Bindings13RuntimeObject11getCallDataERNS_8CallDataE
 __ZN3JSC8Bindings13RuntimeObject14deletePropertyEPNS_9ExecStateERKNS_10IdentifierE
-__ZN3JSC8Bindings13RuntimeObject14finishCreationEPNS_14JSGlobalObjectE
 __ZN3JSC8Bindings13RuntimeObject16getConstructDataERNS_13ConstructDataE
 __ZN3JSC8Bindings13RuntimeObject18getOwnPropertySlotEPNS_9ExecStateERKNS_10IdentifierERNS_12PropertySlotE
 __ZN3JSC8Bindings13RuntimeObject19getOwnPropertyNamesEPNS_9ExecStateERNS_17PropertyNameArrayENS_15EnumerationModeE
index 01d51f0..46530c3 100644 (file)
@@ -55,7 +55,6 @@ namespace WebCore {
         DOMConstructorObject(JSC::Structure* structure, JSDOMGlobalObject* globalObject)
             : JSDOMWrapper(structure, globalObject)
         {
-            finishCreation(globalObject->globalData(), globalObject);
         }
     };
 
index f9eaf6a..4dafa68 100644 (file)
@@ -43,16 +43,10 @@ namespace WebCore {
 const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, 0, 0 };
 
 JSDOMGlobalObject::JSDOMGlobalObject(JSGlobalData& globalData, Structure* structure, PassRefPtr<DOMWrapperWorld> world, JSObject* thisValue)
-    : JSGlobalObject(globalData, structure)
+    : JSGlobalObject(globalData, structure, thisValue)
     , m_currentEvent(0)
     , m_world(world)
 {
-    finishCreation(globalData, thisValue);
-}
-
-void JSDOMGlobalObject::finishCreation(JSGlobalData& globalData, JSObject* thisValue)
-{
-    Base::finishCreation(globalData, thisValue);
     ASSERT(inherits(&s_info));
 }
 
index 9a838bf..e0a6a07 100644 (file)
@@ -47,7 +47,6 @@ namespace WebCore {
         struct JSDOMGlobalObjectData;
 
         JSDOMGlobalObject(JSC::JSGlobalData&, JSC::Structure*, PassRefPtr<DOMWrapperWorld>, JSC::JSObject* thisValue);
-        void finishCreation(JSC::JSGlobalData&, JSC::JSObject* thisValue);
 
     public:
         JSDOMStructureMap& structures() { return m_structures; }
index d3169b6..49e1b4a 100644 (file)
@@ -181,6 +181,13 @@ void* JSDOMWindowShell::operator new(size_t size)
     return heap.allocate(size);
 }
 
+JSDOMWindowShell* JSDOMWindowShell::create(PassRefPtr<DOMWindow> window, JSC::Structure* structure, DOMWrapperWorld* world)
+{
+    JSDOMWindowShell* shell = new JSDOMWindowShell(structure, world);
+    shell->finishCreation(*world->globalData(), window);
+    return shell; 
+}
+
 // ----
 // Conversion methods
 // ----
index 87d026d..534ea2a 100644 (file)
@@ -55,12 +55,7 @@ namespace WebCore {
 
         DOMWindow* impl() const;
 
-        static JSDOMWindowShell* create(PassRefPtr<DOMWindow> window, JSC::Structure* structure, DOMWrapperWorld* world) 
-        {
-            JSDOMWindowShell* shell = new JSDOMWindowShell(structure, world);
-            shell->finishCreation(*world->globalData(), window);
-            return shell; 
-        }
+        static JSDOMWindowShell* create(PassRefPtr<DOMWindow>, JSC::Structure*, DOMWrapperWorld*);
 
         static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSValue prototype) 
         {
index 036ccbd..8f2c08e 100644 (file)
@@ -59,6 +59,7 @@ protected:
         // new JavaScript objects on detached windows due to DOMWindow::document()
         // needing to reach through the frame to get to the Document*.  See bug 27640.
         // ASSERT(globalObject->scriptExecutionContext());
+        finishCreation(globalObject->globalData(), globalObject);
     }
 };
 
index 8f2cfd8..7a11a01 100644 (file)
@@ -1514,24 +1514,20 @@ sub GenerateImplementation
         AddIncludesForTypeInImpl("JSDOMWindowShell");
         push(@implContent, "${className}::$className(JSGlobalData& globalData, Structure* structure, PassRefPtr<$implType> impl, JSDOMWindowShell* shell)\n");
         push(@implContent, "    : $parentClassName(globalData, structure, impl, shell)\n");
-        push(@implContent, "{\n");
     } elsif ($dataNode->extendedAttributes->{"IsWorkerContext"}) {
         AddIncludesForTypeInImpl($interfaceName);
         push(@implContent, "${className}::$className(JSGlobalData& globalData, Structure* structure, PassRefPtr<$implType> impl)\n");
         push(@implContent, "    : $parentClassName(globalData, structure, impl)\n");
-        push(@implContent, "{\n");
     } else {
         push(@implContent, "${className}::$className(Structure* structure, JSDOMGlobalObject* globalObject, PassRefPtr<$implType> impl)\n");
         if ($hasParent) {
             push(@implContent, "    : $parentClassName(structure, globalObject, impl)\n");
-            push(@implContent, "{\n");
         } else {
             push(@implContent, "    : $parentClassName(structure, globalObject)\n");
             push(@implContent, "    , m_impl(impl)\n");
-            push(@implContent, "{\n");
-            push(@implContent, "    finishCreation(globalObject->globalData(), globalObject);\n");
         }
     }
+    push(@implContent, "{\n");
     push(@implContent, "    ASSERT(inherits(&s_info));\n");
     if ($numCachedAttributes > 0) {
         push(@implContent, "    for (unsigned i = Base::AnonymousSlotCount; i < AnonymousSlotCount; i++)\n");
index f9bbd0b..a0de23f 100644 (file)
@@ -146,7 +146,6 @@ JSTestInterface::JSTestInterface(Structure* structure, JSDOMGlobalObject* global
     : JSDOMWrapper(structure, globalObject)
     , m_impl(impl)
 {
-    finishCreation(globalObject->globalData(), globalObject);
     ASSERT(inherits(&s_info));
 }
 
index 059601a..2c1e72b 100644 (file)
@@ -142,7 +142,6 @@ JSTestMediaQueryListListener::JSTestMediaQueryListListener(Structure* structure,
     : JSDOMWrapper(structure, globalObject)
     , m_impl(impl)
 {
-    finishCreation(globalObject->globalData(), globalObject);
     ASSERT(inherits(&s_info));
 }
 
index d3256b7..0db3d88 100644 (file)
@@ -297,7 +297,6 @@ JSTestObj::JSTestObj(Structure* structure, JSDOMGlobalObject* globalObject, Pass
     : JSDOMWrapper(structure, globalObject)
     , m_impl(impl)
 {
-    finishCreation(globalObject->globalData(), globalObject);
     ASSERT(inherits(&s_info));
 }
 
index 4e58f24..77f9bdd 100644 (file)
@@ -132,7 +132,6 @@ JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface(Struc
     : JSDOMWrapper(structure, globalObject)
     , m_impl(impl)
 {
-    finishCreation(globalObject->globalData(), globalObject);
     ASSERT(inherits(&s_info));
 }
 
index b460a91..c63e586 100644 (file)
@@ -40,12 +40,6 @@ const ClassInfo CRuntimeObject::s_info = { "CRuntimeObject", &RuntimeObject::s_i
 CRuntimeObject::CRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<CInstance> instance)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
-}
-
-void CRuntimeObject::finishCreation(JSGlobalObject* globalObject)
-{
-    Base::finishCreation(globalObject);
     ASSERT(inherits(&s_info));
 }
 
index ef19c8a..6fe7dfa 100644 (file)
@@ -61,7 +61,6 @@ public:
 
 private:
     CRuntimeObject(ExecState*, JSGlobalObject*, Structure*, PassRefPtr<CInstance>);
-    void finishCreation(JSGlobalObject*);
 };
 
 }
index d684ab0..fffe856 100644 (file)
@@ -38,12 +38,6 @@ const ClassInfo JavaRuntimeObject::s_info = { "JavaRuntimeObject", &RuntimeObjec
 JavaRuntimeObject::JavaRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<JavaInstance> instance)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
-}
-
-void JavaRuntimeObject::finishCreation(JSGlobalObject* globalObject)
-{
-    Base::finishCreation(globalObject);
     ASSERT(inherits(&s_info));
 }
 
index bb17938..70a3ce9 100644 (file)
@@ -59,7 +59,6 @@ public:
 
 private:
     JavaRuntimeObject(ExecState*, JSGlobalObject*, Structure*, PassRefPtr<JavaInstance>);
-    void finishCreation(JSGlobalObject*);
 };
 
 }
index 0340c05..bfa1f91 100644 (file)
@@ -58,7 +58,6 @@ public:
 
 private:
     ObjCRuntimeObject(ExecState*, JSGlobalObject*, PassRefPtr<ObjcInstance>, Structure*);
-    void finishCreation(JSGlobalObject*);
 };
 
 }
index c51bd4d..ea86263 100644 (file)
@@ -38,12 +38,6 @@ const ClassInfo ObjCRuntimeObject::s_info = { "ObjCRuntimeObject", &RuntimeObjec
 ObjCRuntimeObject::ObjCRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, PassRefPtr<ObjcInstance> instance, Structure* structure)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
-}
-
-void ObjCRuntimeObject::finishCreation(JSGlobalObject* globalObject)
-{
-    Base::finishCreation(globalObject);
     ASSERT(inherits(&s_info));
 }
 
index e571a55..a5a6725 100644 (file)
@@ -99,9 +99,7 @@ public:
     {
         // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
         Structure* domStructure = WebCore::deprecatedGetDOMStructure<ObjcFallbackObjectImp>(exec);
-        ObjcFallbackObjectImp* fallbackObject = new (allocateCell<ObjcFallbackObjectImp>(*exec->heap())) ObjcFallbackObjectImp(globalObject, domStructure, instance, propertyName);
-        fallbackObject->finishCreation(globalObject);
-        return fallbackObject;
+        return new (allocateCell<ObjcFallbackObjectImp>(*exec->heap())) ObjcFallbackObjectImp(globalObject, domStructure, instance, propertyName);
     }
 
     static const ClassInfo s_info;
index ace2ba7..df0e71c 100644 (file)
@@ -201,6 +201,7 @@ ObjcFallbackObjectImp::ObjcFallbackObjectImp(JSGlobalObject* globalObject, Struc
     , _instance(i)
     , _item(propertyName)
 {
+    finishCreation(globalObject);
 }
 
 void ObjcFallbackObjectImp::finishCreation(JSGlobalObject* globalObject)
index fc1a346..9899160 100644 (file)
@@ -85,7 +85,6 @@ const ClassInfo QtRuntimeObject::s_info = { "QtRuntimeObject", &RuntimeObject::s
 QtRuntimeObject::QtRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
 }
 
 // QtInstance
index 68741b4..879ac7d 100644 (file)
@@ -224,7 +224,6 @@ private:
 QtPixmapRuntimeObject::QtPixmapRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
 }
 
 const ClassInfo QtPixmapRuntimeObject::s_info = { "QtPixmapRuntimeObject", &RuntimeObject::s_info, 0, 0 };
index 53e301f..d665b61 100644 (file)
@@ -1006,18 +1006,12 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
 
 const ClassInfo QtRuntimeMethod::s_info = { "QtRuntimeMethod", &InternalFunction::s_info, 0, 0 };
 
-QtRuntimeMethod::QtRuntimeMethod(QtRuntimeMethodData* dd, ExecState* exec, Structure* structure, const Identifier& identifier, PassRefPtr<QtInstance> instance)
-    : InternalFunction(exec->lexicalGlobalObject(), structure)
+QtRuntimeMethod::QtRuntimeMethod(QtRuntimeMethodData* dd, ExecState* exec, Structure* structure, const Identifier& ident, PassRefPtr<QtInstance> inst)
+    : InternalFunction(&exec->globalData(), exec->lexicalGlobalObject(), structure, ident)
     , d_ptr(dd)
 {
-    finishCreation(exec, identifier, instance);
-}
-
-void QtRuntimeMethod::finishCreation(ExecState* exec, const Identifier& identifier, PassRefPtr<QtInstance> instance)
-{
-    Base::finishCreation(exec->globalData(), exec->lexicalGlobalObject(), identifier);
     QW_D(QtRuntimeMethod);
-    d->m_instance = instance;
+    d->m_instance = inst;
     d->m_finalizer.set(exec->globalData(), this, d);
 }
 
index 8b6f034..dea67d3 100644 (file)
@@ -144,7 +144,6 @@ public:
     }
 
 protected:
-    void finishCreation(ExecState*, const Identifier&, PassRefPtr<QtInstance>);
     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | InternalFunction::StructureFlags | OverridesVisitChildren;
 
     QtRuntimeMethodData *d_func() const {return d_ptr;}
index 8a037f9..e01a15f 100644 (file)
@@ -37,9 +37,10 @@ namespace JSC {
 
 const ClassInfo RuntimeArray::s_info = { "RuntimeArray", &JSArray::s_info, 0, 0 };
 
-RuntimeArray::RuntimeArray(ExecState* exec, Structure* structure)
+RuntimeArray::RuntimeArray(ExecState* exec, Structure* structure, Bindings::Array* array)
     : JSArray(exec->globalData(), structure)
 {
+    finishCreation(exec->globalData(), array);
 }
 
 void RuntimeArray::finishCreation(JSGlobalData& globalData, Bindings::Array* array)
index 6cb8eb3..1021e7d 100644 (file)
@@ -41,9 +41,7 @@ public:
         // FIXME: deprecatedGetDOMStructure uses the prototype off of the wrong global object
         // We need to pass in the right global object for "array".
         Structure* domStructure = WebCore::deprecatedGetDOMStructure<RuntimeArray>(exec);
-        RuntimeArray* runtimeArray = new (allocateCell<RuntimeArray>(*exec->heap())) RuntimeArray(exec, domStructure);
-        runtimeArray->finishCreation(exec->globalData(), array);
-        return runtimeArray;
+        return new (allocateCell<RuntimeArray>(*exec->heap())) RuntimeArray(exec, domStructure, array);
     }
 
     typedef Bindings::Array BindingsArray;
@@ -81,7 +79,7 @@ protected:
     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | OverridesGetPropertyNames | JSArray::StructureFlags;
 
 private:
-    RuntimeArray(ExecState*, Structure*);
+    RuntimeArray(ExecState*, Structure*, Bindings::Array*);
     static JSValue lengthGetter(ExecState*, JSValue, const Identifier&);
     static JSValue indexGetter(ExecState*, JSValue, unsigned);
 };
index d14f54f..28fbd3f 100644 (file)
@@ -45,15 +45,9 @@ const ClassInfo RuntimeMethod::s_info = { "RuntimeMethod", &InternalFunction::s_
 
 RuntimeMethod::RuntimeMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& ident, Bindings::MethodList& m)
     // Callers will need to pass in the right global object corresponding to this native object "m".
-    : InternalFunction(globalObject, structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, ident)
     , _methodList(adoptPtr(new MethodList(m)))
 {
-    finishCreation(exec->globalData(), globalObject, ident);
-}
-
-void RuntimeMethod::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& ident)
-{
-    Base::finishCreation(globalData, globalObject, ident);
     ASSERT(inherits(&s_info));
 }
 
index b44e796..cf82073 100644 (file)
@@ -58,7 +58,6 @@ public:
 
 protected:
     RuntimeMethod(ExecState*, JSGlobalObject*, Structure*, const Identifier& name, Bindings::MethodList&);
-    void finishCreation(JSGlobalData&, JSGlobalObject*, const Identifier&);
     static const unsigned StructureFlags = OverridesGetOwnPropertySlot | InternalFunction::StructureFlags;
 
 private:
index 9bfe467..96640f0 100644 (file)
@@ -41,6 +41,7 @@ RuntimeObject::RuntimeObject(ExecState*, JSGlobalObject* globalObject, Structure
     : JSObjectWithGlobalObject(globalObject, structure)
     , m_instance(instance)
 {
+    finishCreation(globalObject);
 }
 
 void RuntimeObject::finishCreation(JSGlobalObject* globalObject)
index 620d90c..d8e00fc 100644 (file)
@@ -39,9 +39,7 @@ public:
 
     static RuntimeObject* create(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<Instance> instance)
     {
-        RuntimeObject* object = new (allocateCell<RuntimeObject>(*exec->heap())) RuntimeObject(exec, globalObject, structure, instance);
-        object->finishCreation(globalObject);
-        return object;
+        return new (allocateCell<RuntimeObject>(*exec->heap())) RuntimeObject(exec, globalObject, structure, instance);
     }
 
     virtual ~RuntimeObject();
index 052c6eb..4adfb56 100644 (file)
@@ -1,3 +1,16 @@
+2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r94627 and r94632.
+        http://trac.webkit.org/changeset/94627
+        http://trac.webkit.org/changeset/94632
+        https://bugs.webkit.org/show_bug.cgi?id=67698
+
+        It broke tests on GTK and Qt (Requested by Ossy on #webkit).
+
+        * Plugins/Hosted/ProxyRuntimeObject.h:
+        * Plugins/Hosted/ProxyRuntimeObject.mm:
+        (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
+
 2011-09-06  Mark Hahnenberg  <mhahnenberg@apple.com>
 
         Unzip initialization lists and constructors in JSCell hierarchy (5/7)
index 5ae9838..313715a 100644 (file)
@@ -59,7 +59,6 @@ public:
     static const JSC::ClassInfo s_info;
 private:
     ProxyRuntimeObject(JSC::ExecState*, JSC::JSGlobalObject*, JSC::Structure*, PassRefPtr<ProxyInstance>);
-    void finishCreation(JSC::JSGlobalObject*);
 };
 
 }
index 5cb2749..8a6481e 100644 (file)
@@ -39,12 +39,6 @@ const ClassInfo ProxyRuntimeObject::s_info = { "ProxyRuntimeObject", &RuntimeObj
 ProxyRuntimeObject::ProxyRuntimeObject(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, PassRefPtr<ProxyInstance> instance)
     : RuntimeObject(exec, globalObject, structure, instance)
 {
-    finishCreation(globalObject);
-}
-
-void ProxyRuntimeObject::finishCreation(JSGlobalObject* globalObject)
-{
-    Base::finishCreation(globalObject);
     ASSERT(inherits(&s_info));
 }
 
index 68aaa48..cbc5a98 100644 (file)
@@ -1,3 +1,21 @@
+2011-09-07  Sheriff Bot  <webkit.review.bot@gmail.com>
+
+        Unreviewed, rolling out r94627 and r94632.
+        http://trac.webkit.org/changeset/94627
+        http://trac.webkit.org/changeset/94632
+        https://bugs.webkit.org/show_bug.cgi?id=67698
+
+        It broke tests on GTK and Qt (Requested by Ossy on #webkit).
+
+        * WebProcess/Plugins/Netscape/JSNPMethod.cpp:
+        (WebKit::JSNPMethod::JSNPMethod):
+        (WebKit::JSNPMethod::create):
+        * WebProcess/Plugins/Netscape/JSNPMethod.h:
+        * WebProcess/Plugins/Netscape/JSNPObject.cpp:
+        (WebKit::JSNPObject::JSNPObject):
+        (WebKit::JSNPObject::create):
+        * WebProcess/Plugins/Netscape/JSNPObject.h:
+
 2011-09-06  Ryosuke Niwa  <rniwa@webkit.org>
 
         fast/forms/suggested-value-crash.html crashes on Windows
index 06586d9..8bb5969 100644 (file)
@@ -30,7 +30,6 @@
 #include <JavaScriptCore/Error.h>
 #include <JavaScriptCore/FunctionPrototype.h>
 #include <JavaScriptCore/JSGlobalObject.h>
-#include <JavaScriptCore/JSObject.h>
 #include <WebCore/JSHTMLElement.h>
 #include <WebCore/JSPluginElementFunctions.h>
 #include <WebCore/NotImplemented.h>
@@ -42,16 +41,17 @@ namespace WebKit {
 
 const ClassInfo JSNPMethod::s_info = { "NPMethod", &InternalFunction::s_info, 0, 0 };
 
-JSNPMethod::JSNPMethod(ExecState* exec, JSGlobalObject* globalObject, Structure* structure, const Identifier& name, NPIdentifier npIdentifier)
-    : InternalFunction(globalObject, structure)
+JSNPMethod::JSNPMethod(ExecState* exec, JSGlobalObject* globalObject, const Identifier& name, NPIdentifier npIdentifier, Structure* structure)
+    : InternalFunction(&exec->globalData(), globalObject, structure, name)
+    , m_npIdentifier(npIdentifier)
 {
-    finishCreation(exec->globalData(), globalObject, name);
+    ASSERT(inherits(&s_info));
 }
 
-void JSNPMethod::finishCreation(JSGlobalData& globalData, JSGlobalObject* globalObject, const Identifier& name)
+JSNPMethod* JSNPMethod::create(ExecState* exec, JSGlobalObject* globalObject, const Identifier& ident, NPIdentifier npIdent)
 {
-    Base::finishCreation(globalData, globalObject, name);
-    ASSERT(inherits(&s_info));
+    JSC::Structure* structure = createStructure(exec->globalData(), globalObject, globalObject->functionPrototype());
+    return new (JSC::allocateCell<JSNPMethod>(*exec->heap())) JSNPMethod(exec, globalObject, ident, npIdent, structure);
 }
 
 static EncodedJSValue JSC_HOST_CALL callMethod(ExecState* exec)
index d1da8c2..ef9ce94 100644 (file)
@@ -26,7 +26,6 @@
 #ifndef JSNPMethod_h
 #define JSNPMethod_h
 
-#include <JavaScriptCore/FunctionPrototype.h>
 #include <JavaScriptCore/InternalFunction.h>
 
 typedef void* NPIdentifier;
@@ -38,21 +37,14 @@ class JSNPMethod : public JSC::InternalFunction {
 public:
     typedef JSC::InternalFunction Base;
 
-    static JSNPMethod* create(JSC::ExecState* exec, JSC::JSGlobalObject* globalObject, const JSC::Identifier& ident, NPIdentifier npIdent)
-    {
-        JSC::Structure* structure = createStructure(exec->globalData(), globalObject, globalObject->functionPrototype());
-        return new (JSC::allocateCell<JSNPMethod>(*exec->heap())) JSNPMethod(exec, globalObject, structure, ident, npIdent);
-    }
+    static JSNPMethod* create(JSC::ExecState*, JSC::JSGlobalObject*, const JSC::Identifier&, NPIdentifier);
 
     static const JSC::ClassInfo s_info;
 
     NPIdentifier npIdentifier() const { return m_npIdentifier; }
 
-protected:
-    void finishCreation(JSC::JSGlobalData&, JSC::JSGlobalObject*, const JSC::Identifier& name);
-
 private:    
-    JSNPMethod(JSC::ExecState*, JSC::JSGlobalObject*, JSC::Structure*, const JSC::Identifier&, NPIdentifier);
+    JSNPMethod(JSC::ExecState*, JSC::JSGlobalObject*, const JSC::Identifier&, NPIdentifier, JSC::Structure*);
 
     static JSC::Structure* createStructure(JSC::JSGlobalData& globalData, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
     {
index 99a3b88..6ed69a1 100644 (file)
@@ -50,11 +50,12 @@ static NPIdentifier npIdentifierFromIdentifier(const Identifier& identifier)
 
 const ClassInfo JSNPObject::s_info = { "NPObject", &JSObjectWithGlobalObject::s_info, 0, 0 };
 
-JSNPObject::JSNPObject(JSGlobalObject* globalObject, Structure* structure, NPRuntimeObjectMap* objectMap, NPObject* npObject)
+JSNPObject::JSNPObject(JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject, Structure* structure)
     : JSObjectWithGlobalObject(globalObject, structure)
     , m_objectMap(objectMap)
     , m_npObject(npObject)
 {
+    finishCreation(globalObject);
 }
 
 void JSNPObject::finishCreation(JSGlobalObject* globalObject)
@@ -68,6 +69,12 @@ void JSNPObject::finishCreation(JSGlobalObject* globalObject)
     retainNPObject(m_npObject);
 }
 
+JSNPObject* JSNPObject::create(JSC::JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject)
+{
+    Structure* structure = createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype());
+    return new (JSC::allocateCell<JSNPObject>(globalObject->globalData().heap)) JSNPObject(globalObject, objectMap, npObject, structure);
+}
+
 JSNPObject::~JSNPObject()
 {
     ASSERT(!m_npObject);
index c074a8c..0bbd5b5 100644 (file)
@@ -27,7 +27,6 @@
 #define JSNPObject_h
 
 #include <JavaScriptCore/JSObjectWithGlobalObject.h>
-#include <JavaScriptCore/ObjectPrototype.h>
 
 typedef void* NPIdentifier;
 struct NPObject;
@@ -42,14 +41,7 @@ class JSNPObject : public JSC::JSObjectWithGlobalObject {
 public:
     typedef JSC::JSObjectWithGlobalObject Base;
 
-    static JSNPObject* create(JSC::JSGlobalObject* globalObject, NPRuntimeObjectMap* objectMap, NPObject* npObject)
-    {
-        JSC::Structure* structure = createStructure(globalObject->globalData(), globalObject, globalObject->objectPrototype());
-        JSNPObject* object = new (JSC::allocateCell<JSNPObject>(globalObject->globalData().heap)) JSNPObject(globalObject, structure, objectMap, npObject);
-        object->finishCreation(globalObject);
-        return object;
-    }
-
+    static JSNPObject* create(JSC::JSGlobalObject*, NPRuntimeObjectMap*, NPObject*);
     ~JSNPObject();
 
     void invalidate();
@@ -69,7 +61,7 @@ protected:
     void finishCreation(JSC::JSGlobalObject*);
 
 private:
-    JSNPObject(JSC::JSGlobalObject*, JSC::Structure*, NPRuntimeObjectMap*, NPObject*);
+    JSNPObject(JSC::JSGlobalObject*, NPRuntimeObjectMap*, NPObject*, JSC::Structure*);
 
     static const unsigned StructureFlags = JSC::OverridesGetOwnPropertySlot | JSC::OverridesGetPropertyNames | JSObject::StructureFlags;