1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:37:34 +00:00

LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocated

This is a monster patch that turns all EventTargets into GC-allocated
PlatformObjects. Their C++ wrapper classes are removed, and the LibJS
garbage collector is now responsible for their lifetimes.

There's a fair amount of hacks and band-aids in this patch, and we'll
have a lot of cleanup to do after this.
This commit is contained in:
Andreas Kling 2022-08-28 13:42:07 +02:00
parent bb547ce1c4
commit 6f433c8656
445 changed files with 4797 additions and 4268 deletions

View file

@ -15,40 +15,40 @@ libweb_js_wrapper(CSS/CSSStyleRule NO_INSTANCE)
libweb_js_wrapper(CSS/CSSStyleSheet NO_INSTANCE)
libweb_js_wrapper(CSS/CSSSupportsRule NO_INSTANCE)
libweb_js_wrapper(CSS/MediaList NO_INSTANCE)
libweb_js_wrapper(CSS/MediaQueryList)
libweb_js_wrapper(CSS/MediaQueryList NO_INSTANCE)
libweb_js_wrapper(CSS/MediaQueryListEvent NO_INSTANCE)
libweb_js_wrapper(CSS/Screen)
libweb_js_wrapper(CSS/StyleSheet NO_INSTANCE)
libweb_js_wrapper(CSS/StyleSheetList NO_INSTANCE)
libweb_js_wrapper(DOM/AbstractRange NO_INSTANCE)
libweb_js_wrapper(DOM/Attribute)
libweb_js_wrapper(DOM/Attribute NO_INSTANCE)
libweb_js_wrapper(DOM/AbortController)
libweb_js_wrapper(DOM/AbortSignal)
libweb_js_wrapper(DOM/CDATASection)
libweb_js_wrapper(DOM/CharacterData)
libweb_js_wrapper(DOM/Comment)
libweb_js_wrapper(DOM/AbortSignal NO_INSTANCE)
libweb_js_wrapper(DOM/CDATASection NO_INSTANCE)
libweb_js_wrapper(DOM/CharacterData NO_INSTANCE)
libweb_js_wrapper(DOM/Comment NO_INSTANCE)
libweb_js_wrapper(DOM/CustomEvent NO_INSTANCE)
libweb_js_wrapper(DOM/Document)
libweb_js_wrapper(DOM/DocumentFragment)
libweb_js_wrapper(DOM/DocumentType)
libweb_js_wrapper(DOM/Document NO_INSTANCE)
libweb_js_wrapper(DOM/DocumentFragment NO_INSTANCE)
libweb_js_wrapper(DOM/DocumentType NO_INSTANCE)
libweb_js_wrapper(DOM/DOMException)
libweb_js_wrapper(DOM/DOMImplementation NO_INSTANCE)
libweb_js_wrapper(DOM/DOMTokenList NO_INSTANCE)
libweb_js_wrapper(DOM/Element)
libweb_js_wrapper(DOM/Element NO_INSTANCE)
libweb_js_wrapper(DOM/Event NO_INSTANCE)
libweb_js_wrapper(DOM/EventTarget)
libweb_js_wrapper(DOM/EventTarget NO_INSTANCE)
libweb_js_wrapper(DOM/HTMLCollection)
libweb_js_wrapper(DOM/MutationRecord)
libweb_js_wrapper(DOM/MutationObserver)
libweb_js_wrapper(DOM/NamedNodeMap NO_INSTANCE)
libweb_js_wrapper(DOM/Node)
libweb_js_wrapper(DOM/Node NO_INSTANCE)
libweb_js_wrapper(DOM/NodeIterator NO_INSTANCE)
libweb_js_wrapper(DOM/NodeList)
libweb_js_wrapper(DOM/ProcessingInstruction)
libweb_js_wrapper(DOM/ProcessingInstruction NO_INSTANCE)
libweb_js_wrapper(DOM/Range NO_INSTANCE)
libweb_js_wrapper(DOM/ShadowRoot)
libweb_js_wrapper(DOM/ShadowRoot NO_INSTANCE)
libweb_js_wrapper(DOM/StaticRange NO_INSTANCE)
libweb_js_wrapper(DOM/Text)
libweb_js_wrapper(DOM/Text NO_INSTANCE)
libweb_js_wrapper(DOM/TreeWalker NO_INSTANCE)
libweb_js_wrapper(DOMParsing/XMLSerializer)
libweb_js_wrapper(Encoding/TextDecoder)
@ -68,113 +68,113 @@ libweb_js_wrapper(HTML/DOMParser)
libweb_js_wrapper(HTML/DOMStringMap NO_INSTANCE)
libweb_js_wrapper(HTML/ErrorEvent NO_INSTANCE)
libweb_js_wrapper(HTML/History)
libweb_js_wrapper(HTML/HTMLAnchorElement)
libweb_js_wrapper(HTML/HTMLAreaElement)
libweb_js_wrapper(HTML/HTMLAudioElement)
libweb_js_wrapper(HTML/HTMLBaseElement)
libweb_js_wrapper(HTML/HTMLBodyElement)
libweb_js_wrapper(HTML/HTMLBRElement)
libweb_js_wrapper(HTML/HTMLButtonElement)
libweb_js_wrapper(HTML/HTMLCanvasElement)
libweb_js_wrapper(HTML/HTMLDataElement)
libweb_js_wrapper(HTML/HTMLDataListElement)
libweb_js_wrapper(HTML/HTMLDetailsElement)
libweb_js_wrapper(HTML/HTMLDialogElement)
libweb_js_wrapper(HTML/HTMLDirectoryElement)
libweb_js_wrapper(HTML/HTMLDivElement)
libweb_js_wrapper(HTML/HTMLDListElement)
libweb_js_wrapper(HTML/HTMLElement)
libweb_js_wrapper(HTML/HTMLEmbedElement)
libweb_js_wrapper(HTML/HTMLFieldSetElement)
libweb_js_wrapper(HTML/HTMLFontElement)
libweb_js_wrapper(HTML/HTMLFormElement)
libweb_js_wrapper(HTML/HTMLFrameElement)
libweb_js_wrapper(HTML/HTMLFrameSetElement)
libweb_js_wrapper(HTML/HTMLHeadElement)
libweb_js_wrapper(HTML/HTMLHeadingElement)
libweb_js_wrapper(HTML/HTMLHRElement)
libweb_js_wrapper(HTML/HTMLHtmlElement)
libweb_js_wrapper(HTML/HTMLIFrameElement)
libweb_js_wrapper(HTML/HTMLImageElement)
libweb_js_wrapper(HTML/HTMLInputElement)
libweb_js_wrapper(HTML/HTMLLabelElement)
libweb_js_wrapper(HTML/HTMLLegendElement)
libweb_js_wrapper(HTML/HTMLLIElement)
libweb_js_wrapper(HTML/HTMLLinkElement)
libweb_js_wrapper(HTML/HTMLMapElement)
libweb_js_wrapper(HTML/HTMLMarqueeElement)
libweb_js_wrapper(HTML/HTMLMediaElement)
libweb_js_wrapper(HTML/HTMLMenuElement)
libweb_js_wrapper(HTML/HTMLMetaElement)
libweb_js_wrapper(HTML/HTMLMeterElement)
libweb_js_wrapper(HTML/HTMLModElement)
libweb_js_wrapper(HTML/HTMLObjectElement)
libweb_js_wrapper(HTML/HTMLOListElement)
libweb_js_wrapper(HTML/HTMLOptGroupElement)
libweb_js_wrapper(HTML/HTMLOptionElement)
libweb_js_wrapper(HTML/HTMLAnchorElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLAreaElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLAudioElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLBaseElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLBodyElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLBRElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLButtonElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLCanvasElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDataElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDataListElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDetailsElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDialogElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDirectoryElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDivElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLDListElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLEmbedElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLFieldSetElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLFontElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLFormElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLFrameElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLFrameSetElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLHeadElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLHeadingElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLHRElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLHtmlElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLIFrameElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLImageElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLInputElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLLabelElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLLegendElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLLIElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLLinkElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMapElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMarqueeElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMediaElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMenuElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMetaElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLMeterElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLModElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLObjectElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLOListElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLOptGroupElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLOptionElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLOptionsCollection)
libweb_js_wrapper(HTML/HTMLOutputElement)
libweb_js_wrapper(HTML/HTMLParagraphElement)
libweb_js_wrapper(HTML/HTMLParamElement)
libweb_js_wrapper(HTML/HTMLPictureElement)
libweb_js_wrapper(HTML/HTMLPreElement)
libweb_js_wrapper(HTML/HTMLProgressElement)
libweb_js_wrapper(HTML/HTMLQuoteElement)
libweb_js_wrapper(HTML/HTMLScriptElement)
libweb_js_wrapper(HTML/HTMLSelectElement)
libweb_js_wrapper(HTML/HTMLSlotElement)
libweb_js_wrapper(HTML/HTMLSourceElement)
libweb_js_wrapper(HTML/HTMLSpanElement)
libweb_js_wrapper(HTML/HTMLStyleElement)
libweb_js_wrapper(HTML/HTMLTableCaptionElement)
libweb_js_wrapper(HTML/HTMLTableCellElement)
libweb_js_wrapper(HTML/HTMLTableColElement)
libweb_js_wrapper(HTML/HTMLTableElement)
libweb_js_wrapper(HTML/HTMLTableRowElement)
libweb_js_wrapper(HTML/HTMLTableSectionElement)
libweb_js_wrapper(HTML/HTMLTemplateElement)
libweb_js_wrapper(HTML/HTMLTextAreaElement)
libweb_js_wrapper(HTML/HTMLTimeElement)
libweb_js_wrapper(HTML/HTMLTitleElement)
libweb_js_wrapper(HTML/HTMLTrackElement)
libweb_js_wrapper(HTML/HTMLUListElement)
libweb_js_wrapper(HTML/HTMLUnknownElement)
libweb_js_wrapper(HTML/HTMLVideoElement)
libweb_js_wrapper(HTML/HTMLOutputElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLParagraphElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLParamElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLPictureElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLPreElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLProgressElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLQuoteElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLScriptElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLSelectElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLSlotElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLSourceElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLSpanElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLStyleElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableCaptionElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableCellElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableColElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableRowElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTableSectionElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTemplateElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTextAreaElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTimeElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTitleElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLTrackElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLUListElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLUnknownElement NO_INSTANCE)
libweb_js_wrapper(HTML/HTMLVideoElement NO_INSTANCE)
libweb_js_wrapper(HTML/ImageData)
libweb_js_wrapper(HTML/MessageChannel)
libweb_js_wrapper(HTML/MessageEvent NO_INSTANCE)
libweb_js_wrapper(HTML/MessagePort)
libweb_js_wrapper(HTML/MessagePort NO_INSTANCE)
libweb_js_wrapper(HTML/PageTransitionEvent NO_INSTANCE)
libweb_js_wrapper(HTML/Path2D)
libweb_js_wrapper(HTML/PromiseRejectionEvent NO_INSTANCE)
libweb_js_wrapper(HTML/Storage)
libweb_js_wrapper(HTML/SubmitEvent NO_INSTANCE)
libweb_js_wrapper(HTML/TextMetrics)
libweb_js_wrapper(HTML/Worker)
libweb_js_wrapper(HTML/WorkerGlobalScope)
libweb_js_wrapper(HTML/Worker NO_INSTANCE)
libweb_js_wrapper(HTML/WorkerGlobalScope NO_INSTANCE)
libweb_js_wrapper(HTML/WorkerLocation)
libweb_js_wrapper(HTML/WorkerNavigator)
libweb_js_wrapper(HighResolutionTime/Performance)
libweb_js_wrapper(HighResolutionTime/Performance NO_INSTANCE)
libweb_js_wrapper(IntersectionObserver/IntersectionObserver)
libweb_js_wrapper(NavigationTiming/PerformanceTiming)
libweb_js_wrapper(RequestIdleCallback/IdleDeadline)
libweb_js_wrapper(ResizeObserver/ResizeObserver)
libweb_js_wrapper(SVG/SVGAnimatedLength)
libweb_js_wrapper(SVG/SVGClipPathElement)
libweb_js_wrapper(SVG/SVGDefsElement)
libweb_js_wrapper(SVG/SVGElement)
libweb_js_wrapper(SVG/SVGGeometryElement)
libweb_js_wrapper(SVG/SVGGraphicsElement)
libweb_js_wrapper(SVG/SVGCircleElement)
libweb_js_wrapper(SVG/SVGEllipseElement)
libweb_js_wrapper(SVG/SVGClipPathElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGDefsElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGGeometryElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGGraphicsElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGCircleElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGEllipseElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGLength)
libweb_js_wrapper(SVG/SVGLineElement)
libweb_js_wrapper(SVG/SVGPathElement)
libweb_js_wrapper(SVG/SVGPolygonElement)
libweb_js_wrapper(SVG/SVGPolylineElement)
libweb_js_wrapper(SVG/SVGRectElement)
libweb_js_wrapper(SVG/SVGSVGElement)
libweb_js_wrapper(SVG/SVGTextContentElement)
libweb_js_wrapper(SVG/SVGLineElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGPathElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGPolygonElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGPolylineElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGRectElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGSVGElement NO_INSTANCE)
libweb_js_wrapper(SVG/SVGTextContentElement NO_INSTANCE)
libweb_js_wrapper(Selection/Selection)
libweb_js_wrapper(UIEvents/FocusEvent NO_INSTANCE)
libweb_js_wrapper(UIEvents/KeyboardEvent NO_INSTANCE)
@ -184,7 +184,7 @@ libweb_js_wrapper(URL/URL)
libweb_js_wrapper(URL/URLSearchParams ITERABLE)
libweb_js_wrapper(WebGL/WebGLContextEvent NO_INSTANCE)
libweb_js_wrapper(WebGL/WebGLRenderingContext)
libweb_js_wrapper(WebSockets/WebSocket)
libweb_js_wrapper(WebSockets/WebSocket NO_INSTANCE)
libweb_js_wrapper(XHR/ProgressEvent NO_INSTANCE)
libweb_js_wrapper(XHR/XMLHttpRequest)
libweb_js_wrapper(XHR/XMLHttpRequestEventTarget)
libweb_js_wrapper(XHR/XMLHttpRequest NO_INSTANCE)
libweb_js_wrapper(XHR/XMLHttpRequestEventTarget NO_INSTANCE)