Refactor automatically generated JS DOM bindings to replace operator new with static create methods
https://bugs.webkit.org/show_bug.cgi?id=64732
Patch by Mark Hahnenberg <[email protected]> on 2011-07-26
Reviewed by Oliver Hunt.
Source/JavaScriptCore:
Replacing the public constructors in the automatically generated JS DOM bindings with static
create methods. JSByteArray is used by several of these bindings in WebCore.
(JSC::JSByteArray::create):
Source/WebCore:
No new tests.
Replacing the public constructors in the automatically generated JS DOM bindings in CodeGeneratorJS.pm
with static create methods. This is part of a larger refactoring effort to use static create methods
in the headers of the generated files (so as to be inline-able) in favor of public constructors throughout JSC.
- bindings/js/JSAudioConstructor.h:
(WebCore::JSAudioConstructor::create):
- bindings/js/JSDOMBinding.h:
(WebCore::createWrapper):
- bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
- bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::history):
(WebCore::JSDOMWindow::location):
- bindings/js/JSDOMWindowShell.cpp:
(WebCore::JSDOMWindowShell::setWindow):
- bindings/js/JSDocumentCustom.cpp:
(WebCore::JSDocument::location):
- bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::create):
- bindings/js/JSImageDataCustom.cpp:
(WebCore::toJS):
- bindings/js/JSOptionConstructor.h:
(WebCore::JSOptionConstructor::create):
- bindings/js/WorkerScriptController.cpp:
(WebCore::WorkerScriptController::initScript):
- bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForTypeInImpl):
(AddIncludesForTypeInHeader):
(AddIncludesForType):
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackImplementation):
(GenerateConstructorDeclaration):
- bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::create):
(WebCore::JSTestInterface::createPrototype):
- bindings/scripts/test/JS/JSTestInterface.h:
(WebCore::JSTestInterface::create):
(WebCore::JSTestInterfacePrototype::create):
- bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::create):
(WebCore::JSTestMediaQueryListListener::createPrototype):
- bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
(WebCore::JSTestMediaQueryListListenerPrototype::create):
- bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::create):
(WebCore::JSTestObj::createPrototype):
- bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
(WebCore::JSTestObjPrototype::create):
- bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
(WebCore::JSTestSerializedScriptValueInterface::createPrototype):
- bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
(WebCore::JSTestSerializedScriptValueInterfacePrototype::create):
- bridge/jni/jsc/JavaArrayJSC.cpp:
(JavaArray::convertJObjectToArray):
- bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::newRuntimeObject):
- bridge/objc/objc_utility.mm:
(JSC::Bindings::convertObjcValueToValue):
- bridge/qt/qt_runtime.cpp:
(JSC::Bindings::convertQVariantToValue):
(JSC::RuntimeArray::create):
(JSC::Bindings::RuntimeObject::create):