Remove LegacyException support from bindings script
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Nov 2016 22:30:22 +0000 (22:30 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 12 Nov 2016 22:30:22 +0000 (22:30 +0000)
commitd16eb888b2ea041cba1b3441642bbac0cd1f7469
tree69927b61efcfbc86e2c21f945fbfceb108b39567
parent86331efd2bab762b4bf56863c7f0b6643f66ebb4
Remove LegacyException support from bindings script
https://bugs.webkit.org/show_bug.cgi?id=164516

Reviewed by Youenn Fablet.

Besides removing LegacyException support from the bindings script, this patch
also removes most uses of ExceptionCodePlaceholder.h. Also, some call sites of
createElement were using ASSERT_NO_EXCEPTION on an argument that was not even an
ExceptionCode&, so to fix that, this changes most call sites to use specific create
functions for specific element classes, rather than using Document::createElement.

* Modules/mediasource/SourceBuffer.cpp: Removed include of
ExceptionCodePlaceholder.h.
* Modules/mediastream/MediaStreamTrack.cpp: Ditto.
* Modules/websockets/WebSocketChannel.cpp: Ditto.
* bindings/js/JSBlobCustom.cpp: Ditto.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation): Removed support for GetterMayThrowLegacyException,
SetterMayThrowLegacyException, and MayThrowLegacyException.
(GenerateParametersCheck): Ditto.
(GenerateImplementationFunctionCall): Ditto.
(GenerateConstructorDefinition): Ditto.

* bindings/scripts/IDLAttributes.txt: Removed ConstructorMayThrowLegacyException,
GetterMayThrowLegacyException, MayThrowLegacyException, and SetterMayThrowLegacyException.

* bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp:
* bindings/scripts/test/JS/JSTestDOMJIT.cpp:
* bindings/scripts/test/JS/JSTestEventTarget.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
* bindings/scripts/test/JS/JSTestNondeterministic.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp:
* bindings/scripts/test/JS/JSTestTypedefs.cpp:
Updated exepected results.

* bindings/scripts/test/TestImplements.idl: Use non-legacy exceptions.
* bindings/scripts/test/TestInterface.idl: Ditto.
* bindings/scripts/test/TestNamedConstructor.idl: Ditto.
* bindings/scripts/test/TestObj.idl: Ditto.
* bindings/scripts/test/TestSupplemental.idl: Ditto.
* bindings/scripts/test/TestTypedefs.idl: Ditto.

* dom/ContainerNode.h: Removed include of ExceptionCodePlaceholder.h.
* editing/AlternativeTextController.cpp: Ditto.
* editing/AppendNodeCommand.cpp: Ditto.

* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::moveParagraphs): Use specific create function
instead of Document::createElement.

* editing/DeleteFromTextNodeCommand.cpp: Removed include of
ExceptionCodePlaceholder.h.
* editing/Editor.cpp: Ditto.
* editing/EditorCommand.cpp: Ditto.
* editing/FormatBlockCommand.cpp: Ditto.

* editing/IndentOutdentCommand.cpp:
(WebCore::IndentOutdentCommand::tryIndentingAsListItem): Use specific create
function instead of Document::createElement.

* editing/InsertListCommand.cpp: Removed include of ExceptionCodePlaceholder.h.
* editing/InsertNodeBeforeCommand.cpp: Ditto.
* editing/RemoveNodeCommand.cpp: Ditto.
* editing/ReplaceSelectionCommand.cpp: Ditto.
* editing/TextIterator.cpp: Ditto.
* editing/WrapContentsInDummySpanCommand.cpp: Ditto.

* editing/cocoa/EditorCocoa.mm:
(WebCore::Editor::styleForSelectionStart): Use specific create function instead
of Document::createElement.
* editing/htmlediting.cpp:
(WebCore::createTabSpanElement): Ditto.
* editing/ios/EditorIOS.mm:
(WebCore::Editor::WebContentReader::readURL): Ditto.
* editing/mac/EditorMac.mm:
(WebCore::Editor::WebContentReader::readURL): Ditto.

* editing/markup.cpp: Removed include of ExceptionCodePlaceholder.h.

* html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::appendEntry): Use specific create function
instead of Document::createElement.
(WebCore::FTPDirectoryDocumentParser::createTDForFilename): Ditto.
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Ditto.
(WebCore::FTPDirectoryDocumentParser::createBasicDocument): Ditto.

* html/HTMLEmbedElement.cpp:
(WebCore::HTMLEmbedElement::create): Added overload that just takes a Document.
* html/HTMLEmbedElement.h: Updated for above.

* html/HTMLMediaElement.cpp: Removed include of ExceptionCodePlaceholder.h.

* html/HTMLMetaElement.cpp:
(WebCore::HTMLMetaElement::create): Added overload that just takes a Document.
* html/HTMLMetaElement.h: Updated for above.

* html/HTMLOutputElement.cpp: Removed include of ExceptionCodePlaceholder.h.

* html/HTMLSelectElement.cpp: Ditto.
(WebCore::HTMLSelectElement::setLength): Use specific create function
instead of Document::createElement.

* html/HTMLSourceElement.cpp:
(WebCore::HTMLSourceElement::create): Added overload that just takes a Document.
* html/HTMLSourceElement.h: Updated for above.

* html/HTMLStyleElement.cpp:
(WebCore::HTMLStyleElement::HTMLStyleElement): Moved data member initialization
to class definition.
(WebCore::HTMLStyleElement::create): Added overload that just takes a Document.
* html/HTMLStyleElement.h: Updated for above. Also made finishParsingChildren public.

* html/HTMLTableElement.cpp: Removed include of ExceptionCodePlaceholder.h.
* html/HTMLTextAreaElement.cpp: Ditto.

* html/HTMLVideoElement.cpp:
(WebCore::HTMLVideoElement::create): Added overload that just takes a Document.
* html/HTMLVideoElement.h: Updated for above.

* html/ImageDocument.cpp:
(WebCore::ImageDocument::createDocumentStructure): Use specific create function
instead of Document::createElement.

* html/InputType.cpp: Removed include of ExceptionCodePlaceholder.h.

* html/MediaDocument.cpp:
(WebCore::MediaDocumentParser::createDocumentStructure): Use specific create
function instead of Document::createElement.
(WebCore::MediaDocument::replaceMediaElementTimerFired): Ditto.
* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::createDocumentStructure): Ditto.

* html/RangeInputType.cpp: Removed include of ExceptionCodePlaceholder.h.

* html/RubyElement.cpp:
(WebCore::RubyElement::create): Added overload that just takes a Document.
* html/RubyElement.h: Updated for above.

* html/RubyTextElement.cpp:
(WebCore::RubyTextElement::create): Added overload that just takes a Document.
* html/RubyTextElement.h: Updated for above.

* html/ValidationMessage.cpp: Removed include of ExceptionCodePlaceholder.h.
* html/canvas/CanvasRenderingContext2D.cpp: Ditto.
* html/shadow/MediaControlElementTypes.cpp: Ditto.

* html/shadow/MediaControlElements.cpp:
(WebCore::MediaControlClosedCaptionsTrackListElement::rebuildTrackListMenu):
Use specific create function instead of Document::createElement.

* html/shadow/MediaControls.cpp: Removed include of ExceptionCodePlaceholder.h.
* html/shadow/MediaControlsApple.cpp: Ditto.
* html/track/InbandDataTextTrack.cpp: Ditto.
* html/track/InbandGenericTextTrack.cpp: Ditto.
* html/track/InbandTextTrack.cpp: Ditto.
* html/track/VTTRegion.cpp: Ditto.

* html/track/WebVTTElement.cpp:
(WebCore::WebVTTElement::createEquivalentHTMLElement): Use specific create
function instead of Document::createElement.
* inspector/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Ditto.

* page/ContextMenuController.cpp: Removed include of ExceptionCodePlaceholder.h.
* page/DOMWindow.cpp: Ditto.
* page/DragController.cpp: Ditto.
* page/EventHandler.cpp: Ditto.
* page/Page.cpp: Ditto.
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Ditto.
* platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm: Ditto.
* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Ditto.
* platform/mac/PasteboardMac.mm: Ditto.
* platform/mac/WebVideoFullscreenHUDWindowController.mm: Ditto.
* platform/mock/mediasource/MockMediaPlayerMediaSource.cpp: Ditto.
* platform/mock/mediasource/MockMediaSourcePrivate.cpp: Ditto.
* rendering/RenderNamedFlowThread.cpp: Ditto.
* rendering/RenderThemeEfl.cpp: Ditto.
* rendering/RenderThemeMac.mm: Ditto.
* rendering/style/SVGRenderStyle.h: Ditto.
* svg/SVGTRefElement.cpp: Ditto.

* xml/XMLErrors.cpp:
(WebCore::XMLErrors::XMLErrors): Take a reference and initialize data member
in class definition.
(WebCore::createXHTMLParserErrorHeader): Take a reference, and mostly use
specific create functions instead of createElement.
(WebCore::XMLErrors::insertErrorMessageBlock): Ditto.
* xml/XMLErrors.h: Updated for above.

* xml/XMLTreeViewer.cpp: Removed include of ExceptionCodePlaceholder.h.

* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::handleError): Pass a reference.

* xml/parser/XMLDocumentParserLibxml2.cpp: Removed include of
ExceptionCodePlaceholder.h.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
101 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediasource/SourceBuffer.cpp
Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp
Source/WebCore/Modules/websockets/WebSocketChannel.cpp
Source/WebCore/bindings/js/JSBlobCustom.cpp
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Source/WebCore/bindings/scripts/IDLAttributes.txt
Source/WebCore/bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestDOMJIT.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestEventTarget.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNamedConstructor.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestNondeterministic.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp
Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp
Source/WebCore/bindings/scripts/test/TestImplements.idl
Source/WebCore/bindings/scripts/test/TestInterface.idl
Source/WebCore/bindings/scripts/test/TestNamedConstructor.idl
Source/WebCore/bindings/scripts/test/TestObj.idl
Source/WebCore/bindings/scripts/test/TestSupplemental.idl
Source/WebCore/bindings/scripts/test/TestTypedefs.idl
Source/WebCore/dom/ContainerNode.h
Source/WebCore/editing/AlternativeTextController.cpp
Source/WebCore/editing/AppendNodeCommand.cpp
Source/WebCore/editing/CompositeEditCommand.cpp
Source/WebCore/editing/DeleteFromTextNodeCommand.cpp
Source/WebCore/editing/Editor.cpp
Source/WebCore/editing/EditorCommand.cpp
Source/WebCore/editing/FormatBlockCommand.cpp
Source/WebCore/editing/IndentOutdentCommand.cpp
Source/WebCore/editing/InsertListCommand.cpp
Source/WebCore/editing/InsertNodeBeforeCommand.cpp
Source/WebCore/editing/RemoveNodeCommand.cpp
Source/WebCore/editing/ReplaceSelectionCommand.cpp
Source/WebCore/editing/TextIterator.cpp
Source/WebCore/editing/WrapContentsInDummySpanCommand.cpp
Source/WebCore/editing/cocoa/EditorCocoa.mm
Source/WebCore/editing/htmlediting.cpp
Source/WebCore/editing/ios/EditorIOS.mm
Source/WebCore/editing/mac/EditorMac.mm
Source/WebCore/editing/markup.cpp
Source/WebCore/html/FTPDirectoryDocument.cpp
Source/WebCore/html/HTMLEmbedElement.cpp
Source/WebCore/html/HTMLEmbedElement.h
Source/WebCore/html/HTMLMediaElement.cpp
Source/WebCore/html/HTMLMetaElement.cpp
Source/WebCore/html/HTMLMetaElement.h
Source/WebCore/html/HTMLOutputElement.cpp
Source/WebCore/html/HTMLSelectElement.cpp
Source/WebCore/html/HTMLSourceElement.cpp
Source/WebCore/html/HTMLSourceElement.h
Source/WebCore/html/HTMLStyleElement.cpp
Source/WebCore/html/HTMLStyleElement.h
Source/WebCore/html/HTMLTableElement.cpp
Source/WebCore/html/HTMLTextAreaElement.cpp
Source/WebCore/html/HTMLVideoElement.cpp
Source/WebCore/html/HTMLVideoElement.h
Source/WebCore/html/ImageDocument.cpp
Source/WebCore/html/InputType.cpp
Source/WebCore/html/MediaDocument.cpp
Source/WebCore/html/PluginDocument.cpp
Source/WebCore/html/RangeInputType.cpp
Source/WebCore/html/RubyElement.cpp
Source/WebCore/html/RubyElement.h
Source/WebCore/html/RubyTextElement.cpp
Source/WebCore/html/RubyTextElement.h
Source/WebCore/html/ValidationMessage.cpp
Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
Source/WebCore/html/shadow/MediaControlElementTypes.cpp
Source/WebCore/html/shadow/MediaControlElements.cpp
Source/WebCore/html/shadow/MediaControls.cpp
Source/WebCore/html/shadow/MediaControlsApple.cpp
Source/WebCore/html/track/InbandDataTextTrack.cpp
Source/WebCore/html/track/InbandGenericTextTrack.cpp
Source/WebCore/html/track/InbandTextTrack.cpp
Source/WebCore/html/track/VTTRegion.cpp
Source/WebCore/html/track/WebVTTElement.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/page/ContextMenuController.cpp
Source/WebCore/page/DOMWindow.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EventHandler.cpp
Source/WebCore/page/Page.cpp
Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm
Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
Source/WebCore/platform/mac/PasteboardMac.mm
Source/WebCore/platform/mac/WebVideoFullscreenHUDWindowController.mm
Source/WebCore/platform/mock/mediasource/MockMediaPlayerMediaSource.cpp
Source/WebCore/platform/mock/mediasource/MockMediaSourcePrivate.cpp
Source/WebCore/rendering/RenderNamedFlowThread.cpp
Source/WebCore/rendering/RenderThemeEfl.cpp
Source/WebCore/rendering/RenderThemeMac.mm
Source/WebCore/rendering/style/SVGRenderStyle.h
Source/WebCore/svg/SVGTRefElement.cpp
Source/WebCore/xml/XMLErrors.cpp
Source/WebCore/xml/XMLErrors.h
Source/WebCore/xml/XMLTreeViewer.cpp
Source/WebCore/xml/parser/XMLDocumentParser.cpp
Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp