-
commit-queue@webkit.org authored
https://bugs.webkit.org/show_bug.cgi?id=67064 Patch by Mark Hahnenberg <mhahnenberg@apple.com> on 2011-08-29 Reviewed by Darin Adler. Source/JavaScriptCore: Completed the third level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * debugger/DebuggerActivation.cpp: (JSC::DebuggerActivation::DebuggerActivation): (JSC::DebuggerActivation::finishCreation): * debugger/DebuggerActivation.h: (JSC::DebuggerActivation::create): * runtime/Arguments.h: (JSC::Arguments::create): (JSC::Arguments::createNoParameters): (JSC::Arguments::Arguments): (JSC::Arguments::finishCreation): * runtime/ErrorInstance.cpp: (JSC::ErrorInstance::ErrorInstance): * runtime/ErrorInstance.h: (JSC::ErrorInstance::finishCreation): * runtime/ExceptionHelpers.cpp: (JSC::InterruptedExecutionError::InterruptedExecutionError): (JSC::TerminatedExecutionError::TerminatedExecutionError): * runtime/Executable.cpp: (JSC::EvalExecutable::EvalExecutable): (JSC::ProgramExecutable::ProgramExecutable): (JSC::FunctionExecutable::FunctionExecutable): Moved the assignment of m_firstLine and m_lastLine into the FunctionExecutable::finishCreation() method in Executable.h * runtime/Executable.h: (JSC::ScriptExecutable::ScriptExecutable): (JSC::EvalExecutable::create): (JSC::ProgramExecutable::create): (JSC::FunctionExecutable::create): (JSC::FunctionExecutable::finishCreation): * runtime/JSArray.cpp: (JSC::JSArray::JSArray): (JSC::JSArray::finishCreation): * runtime/JSArray.h: * runtime/JSByteArray.cpp: (JSC::JSByteArray::JSByteArray): * runtime/JSByteArray.h: (JSC::JSByteArray::finishCreation): * runtime/JSNotAnObject.h: (JSC::JSNotAnObject::JSNotAnObject): * runtime/JSObject.h: (JSC::JSNonFinalObject::JSNonFinalObject): * runtime/JSObjectWithGlobalObject.cpp: (JSC::JSObjectWithGlobalObject::JSObjectWithGlobalObject): (JSC::JSObjectWithGlobalObject::finishCreation): * runtime/JSObjectWithGlobalObject.h: * runtime/JSVariableObject.h: (JSC::JSVariableObject::JSVariableObject): (JSC::JSVariableObject::finishCreation): * runtime/JSWrapperObject.h: (JSC::JSWrapperObject::JSWrapperObject): * runtime/ObjectPrototype.cpp: (JSC::ObjectPrototype::ObjectPrototype): (JSC::ObjectPrototype::finishCreation): * runtime/ObjectPrototype.h: * runtime/StrictEvalActivation.cpp: (JSC::StrictEvalActivation::StrictEvalActivation): Source/JavaScriptGlue: Completed the third level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * UserObjectImp.cpp: (UserObjectImp::UserObjectImp): Source/WebCore: No new tests. Completed the third level of the refactoring to add finishCreation() methods to all classes within the JSCell hierarchy with non-trivial constructor bodies. This primarily consists of pushing the calls to finishCreation() down into the constructors of the subclasses of the second level of the hierarchy as well as pulling the finishCreation() calls out into the class's corresponding create() method if it has one. Doing both simultaneously allows us to maintain the invariant that the finishCreation() method chain is called exactly once during the creation of an object, since calling it any other number of times (0, 2, or more) will cause an assertion failure. * bindings/js/JSDOMWindowShell.cpp: (WebCore::JSDOMWindowShell::JSDOMWindowShell): (WebCore::JSDOMWindowShell::finishCreation): * bindings/js/JSDOMWindowShell.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@94035 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1a0a3631