Binding generated JS constructors should use GlobalObject references
authoryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 07:30:23 +0000 (07:30 +0000)
committeryouenn.fablet@crf.canon.fr <youenn.fablet@crf.canon.fr@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Oct 2015 07:30:23 +0000 (07:30 +0000)
commitd23e35fd2e644a114519371d789d0ca9b1fb65e7
tree1ead5cda5bd61dceee39fabafb762fd3f262c8ba
parent5220ec9ddaba618ee401316474e7a5198903f139
Binding generated JS constructors should use GlobalObject references
https://bugs.webkit.org/show_bug.cgi?id=149872

Reviewed by Darin Adler.

Updated binding generator to generate JS DOM constructors code with JSDOMGlobalOBject references.
Updated WebCore JS binding layer accordingly.

Covered by updated binding tests.

* bindings/js/DOMConstructorWithDocument.h:
(WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
(WebCore::DOMConstructorWithDocument::finishCreation):
* bindings/js/JSDOMBinding.cpp:
(WebCore::getCachedDOMStructure):
(WebCore::cacheDOMStructure):
* bindings/js/JSDOMBinding.h:
(WebCore::DOMConstructorObject::DOMConstructorObject):
(WebCore::DOMConstructorJSBuiltinObject::DOMConstructorJSBuiltinObject):
(WebCore::getDOMStructure):
(WebCore::deprecatedGetDOMStructure):
(WebCore::getDOMPrototype):
(WebCore::createJSBuiltin):
(WebCore::createWrapper):
* bindings/js/JSDOMConstructor.h:
(WebCore::JSBuiltinConstructor::JSBuiltinConstructor):
* bindings/js/JSDOMGlobalObject.h:
(WebCore::getDOMConstructor):
* bindings/js/JSDOMWindowCustom.cpp:
(WebCore::JSDOMWindow::image):
(WebCore::JSDOMWindow::touch):
(WebCore::JSDOMWindow::touchList):
* bindings/js/JSDOMWrapper.h:
(WebCore::JSDOMWrapper::JSDOMWrapper):
(WebCore::JSDOMWrapperWithImplementation::JSDOMWrapperWithImplementation):
* bindings/js/JSImageConstructor.cpp:
(WebCore::JSImageConstructor::JSImageConstructor):
(WebCore::JSImageConstructor::finishCreation):
* bindings/js/JSImageConstructor.h:
(WebCore::JSImageConstructor::create):
(WebCore::JSImageConstructor::createStructure):
* bindings/js/JSReadableStreamPrivateConstructors.cpp:
(WebCore::JSBuiltinReadableStreamReaderPrivateConstructor::createJSObject):
(WebCore::JSBuiltinReadableStreamControllerPrivateConstructor::createJSObject):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateHeader):
(GenerateImplementation):
(GenerateCallbackImplementation):
(GenerateConstructorDeclaration):
(GenerateConstructorHelperMethods):
* bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
(WebCore::JSTestActiveDOMObjectConstructor::create):
(WebCore::JSTestActiveDOMObjectConstructor::createStructure):
(WebCore::JSTestActiveDOMObjectConstructor::JSTestActiveDOMObjectConstructor):
(WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
(WebCore::JSTestActiveDOMObject::JSTestActiveDOMObject):
(WebCore::JSTestActiveDOMObject::getConstructor):
* bindings/scripts/test/JS/JSTestActiveDOMObject.h:
(WebCore::JSTestActiveDOMObject::create):
* bindings/scripts/test/JS/JSTestCallback.cpp:
(WebCore::JSTestCallbackConstructor::create):
(WebCore::JSTestCallbackConstructor::createStructure):
(WebCore::JSTestCallbackConstructor::JSTestCallbackConstructor):
(WebCore::JSTestCallback::getConstructor):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::create):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::createStructure):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::JSTestCustomConstructorWithNoInterfaceObjectConstructor):
(WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::JSTestCustomConstructorWithNoInterfaceObject):
(WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor):
* bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h:
(WebCore::JSTestCustomConstructorWithNoInterfaceObject::create):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
(WebCore::JSTestCustomNamedGetterConstructor::create):
(WebCore::JSTestCustomNamedGetterConstructor::createStructure):
(WebCore::JSTestCustomNamedGetterConstructor::JSTestCustomNamedGetterConstructor):
(WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
(WebCore::JSTestCustomNamedGetter::JSTestCustomNamedGetter):
(WebCore::JSTestCustomNamedGetter::getConstructor):
* bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
(WebCore::JSTestCustomNamedGetter::create):
* bindings/scripts/test/JS/JSTestEventConstructor.cpp:
(WebCore::JSTestEventConstructorConstructor::create):
(WebCore::JSTestEventConstructorConstructor::createStructure):
(WebCore::JSTestEventConstructorConstructor::JSTestEventConstructorConstructor):
(WebCore::JSTestEventConstructorConstructor::finishCreation):
(WebCore::JSTestEventConstructor::JSTestEventConstructor):
(WebCore::JSTestEventConstructor::getConstructor):
* bindings/scripts/test/JS/JSTestEventConstructor.h:
(WebCore::JSTestEventConstructor::create):
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
(WebCore::JSTestEventTargetConstructor::create):
(WebCore::JSTestEventTargetConstructor::createStructure):
(WebCore::JSTestEventTargetConstructor::JSTestEventTargetConstructor):
(WebCore::JSTestEventTargetConstructor::finishCreation):
(WebCore::JSTestEventTarget::JSTestEventTarget):
(WebCore::JSTestEventTarget::getConstructor):
* bindings/scripts/test/JS/JSTestEventTarget.h:
(WebCore::JSTestEventTarget::create):
* bindings/scripts/test/JS/JSTestException.cpp:
(WebCore::JSTestExceptionConstructor::create):
(WebCore::JSTestExceptionConstructor::createStructure):
(WebCore::JSTestExceptionConstructor::JSTestExceptionConstructor):
(WebCore::JSTestExceptionConstructor::finishCreation):
(WebCore::JSTestException::JSTestException):
(WebCore::JSTestException::getConstructor):
* bindings/scripts/test/JS/JSTestException.h:
(WebCore::JSTestException::create):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
(WebCore::JSTestGenerateIsReachableConstructor::create):
(WebCore::JSTestGenerateIsReachableConstructor::createStructure):
(WebCore::JSTestGenerateIsReachableConstructor::JSTestGenerateIsReachableConstructor):
(WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
(WebCore::JSTestGenerateIsReachable::JSTestGenerateIsReachable):
(WebCore::JSTestGenerateIsReachable::getConstructor):
* bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
(WebCore::JSTestGenerateIsReachable::create):
* bindings/scripts/test/JS/JSTestInterface.cpp:
(WebCore::JSTestInterfaceConstructor::create):
(WebCore::JSTestInterfaceConstructor::createStructure):
(WebCore::JSTestInterfaceConstructor::JSTestInterfaceConstructor):
(WebCore::JSTestInterfaceConstructor::finishCreation):
(WebCore::JSTestInterface::JSTestInterface):
(WebCore::JSTestInterface::getConstructor):
* bindings/scripts/test/JS/JSTestInterface.h:
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp:
(WebCore::JSTestJSBuiltinConstructorConstructor::create):
(WebCore::JSTestJSBuiltinConstructorConstructor::createStructure):
(WebCore::JSTestJSBuiltinConstructorConstructor::JSTestJSBuiltinConstructorConstructor):
(WebCore::JSTestJSBuiltinConstructorConstructor::finishCreation):
(WebCore::JSTestJSBuiltinConstructor::JSTestJSBuiltinConstructor):
(WebCore::JSTestJSBuiltinConstructor::getConstructor):
* bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h:
(WebCore::JSTestJSBuiltinConstructor::create):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
(WebCore::JSTestMediaQueryListListenerConstructor::create):
(WebCore::JSTestMediaQueryListListenerConstructor::createStructure):
(WebCore::JSTestMediaQueryListListenerConstructor::JSTestMediaQueryListListenerConstructor):
(WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
(WebCore::JSTestMediaQueryListListener::JSTestMediaQueryListListener):
(WebCore::JSTestMediaQueryListListener::getConstructor):
* bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
(WebCore::JSTestMediaQueryListListener::create):
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
(WebCore::JSTestNamedConstructorConstructor::create):
(WebCore::JSTestNamedConstructorConstructor::createStructure):
(WebCore::JSTestNamedConstructorNamedConstructor::create):
(WebCore::JSTestNamedConstructorNamedConstructor::createStructure):
(WebCore::JSTestNamedConstructorConstructor::JSTestNamedConstructorConstructor):
(WebCore::JSTestNamedConstructorConstructor::finishCreation):
(WebCore::JSTestNamedConstructorNamedConstructor::JSTestNamedConstructorNamedConstructor):
(WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
(WebCore::JSTestNamedConstructor::JSTestNamedConstructor):
(WebCore::JSTestNamedConstructor::getConstructor):
(WebCore::JSTestNamedConstructor::getNamedConstructor):
* bindings/scripts/test/JS/JSTestNamedConstructor.h:
(WebCore::JSTestNamedConstructor::create):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::JSTestNodeConstructor::create):
(WebCore::JSTestNodeConstructor::createStructure):
(WebCore::JSTestNodeConstructor::JSTestNodeConstructor):
(WebCore::JSTestNodeConstructor::finishCreation):
(WebCore::JSTestNode::JSTestNode):
(WebCore::JSTestNode::getConstructor):
* bindings/scripts/test/JS/JSTestNode.h:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
(WebCore::JSTestNondeterministicConstructor::create):
(WebCore::JSTestNondeterministicConstructor::createStructure):
(WebCore::JSTestNondeterministicConstructor::JSTestNondeterministicConstructor):
(WebCore::JSTestNondeterministicConstructor::finishCreation):
(WebCore::JSTestNondeterministic::JSTestNondeterministic):
(WebCore::JSTestNondeterministic::getConstructor):
* bindings/scripts/test/JS/JSTestNondeterministic.h:
(WebCore::JSTestNondeterministic::create):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::JSTestObjConstructor::create):
(WebCore::JSTestObjConstructor::createStructure):
(WebCore::JSTestObjConstructor::JSTestObjConstructor):
(WebCore::JSTestObjConstructor::finishCreation):
(WebCore::JSTestObj::JSTestObj):
(WebCore::JSTestObj::getConstructor):
* bindings/scripts/test/JS/JSTestObj.h:
(WebCore::JSTestObj::create):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
(WebCore::JSTestOverloadedConstructorsConstructor::create):
(WebCore::JSTestOverloadedConstructorsConstructor::createStructure):
(WebCore::JSTestOverloadedConstructorsConstructor::JSTestOverloadedConstructorsConstructor):
(WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
(WebCore::JSTestOverloadedConstructors::JSTestOverloadedConstructors):
(WebCore::JSTestOverloadedConstructors::getConstructor):
* bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
(WebCore::JSTestOverloadedConstructors::create):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
(WebCore::JSTestOverrideBuiltinsConstructor::create):
(WebCore::JSTestOverrideBuiltinsConstructor::createStructure):
(WebCore::JSTestOverrideBuiltinsConstructor::JSTestOverrideBuiltinsConstructor):
(WebCore::JSTestOverrideBuiltinsConstructor::finishCreation):
(WebCore::JSTestOverrideBuiltins::JSTestOverrideBuiltins):
(WebCore::JSTestOverrideBuiltins::getConstructor):
* bindings/scripts/test/JS/JSTestOverrideBuiltins.h:
(WebCore::JSTestOverrideBuiltins::create):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::create):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::createStructure):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::JSTestSerializedScriptValueInterfaceConstructor):
(WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
(WebCore::JSTestSerializedScriptValueInterface::JSTestSerializedScriptValueInterface):
(WebCore::JSTestSerializedScriptValueInterface::getConstructor):
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
(WebCore::JSTestSerializedScriptValueInterface::create):
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
(WebCore::JSTestTypedefsConstructor::create):
(WebCore::JSTestTypedefsConstructor::createStructure):
(WebCore::JSTestTypedefsConstructor::JSTestTypedefsConstructor):
(WebCore::JSTestTypedefsConstructor::finishCreation):
(WebCore::JSTestTypedefs::JSTestTypedefs):
(WebCore::JSTestTypedefs::getConstructor):
* bindings/scripts/test/JS/JSTestTypedefs.h:
(WebCore::JSTestTypedefs::create):
* bindings/scripts/test/JS/JSattribute.cpp:
(WebCore::JSattributeConstructor::create):
(WebCore::JSattributeConstructor::createStructure):
(WebCore::JSattributeConstructor::JSattributeConstructor):
(WebCore::JSattributeConstructor::finishCreation):
(WebCore::JSattribute::JSattribute):
(WebCore::JSattribute::getConstructor):
* bindings/scripts/test/JS/JSattribute.h:
(WebCore::JSattribute::create):
* bindings/scripts/test/JS/JSreadonly.cpp:
(WebCore::JSreadonlyConstructor::create):
(WebCore::JSreadonlyConstructor::createStructure):
(WebCore::JSreadonlyConstructor::JSreadonlyConstructor):
(WebCore::JSreadonlyConstructor::finishCreation):
(WebCore::JSreadonly::JSreadonly):
(WebCore::JSreadonly::getConstructor):
* bindings/scripts/test/JS/JSreadonly.h:
(WebCore::JSreadonly::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@190714 268f45cc-cd09-0410-ab3c-d52691b4dbfc
53 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/DOMConstructorWithDocument.h
Source/WebCore/bindings/js/JSDOMBinding.cpp
Source/WebCore/bindings/js/JSDOMBinding.h
Source/WebCore/bindings/js/JSDOMConstructor.h
Source/WebCore/bindings/js/JSDOMGlobalObject.h
Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
Source/WebCore/bindings/js/JSDOMWrapper.h
Source/WebCore/bindings/js/JSImageConstructor.cpp
Source/WebCore/bindings/js/JSImageConstructor.h
Source/WebCore/bindings/js/JSReadableStreamPrivateConstructors.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestActiveDOMObject.h
Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.h
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestCustomNamedGetter.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.h
Source/WebCore/bindings/scripts/test/JS/JSTestException.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestException.h
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestGenerateIsReachable.h
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestJSBuiltinConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestMediaQueryListListener.h
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.h
Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNode.h
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.h
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.h
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.h
Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.h
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.h
Source/WebCore/bindings/scripts/test/JS/JSattribute.cpp
Source/WebCore/bindings/scripts/test/JS/JSattribute.h
Source/WebCore/bindings/scripts/test/JS/JSreadonly.cpp
Source/WebCore/bindings/scripts/test/JS/JSreadonly.h