[webkit-changes] [WebKit/WebKit] c7c0f9: Use CheckedPtr for DOM tree pointers
Chris Dumez
noreply at github.com
Fri Jul 26 07:41:56 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c7c0f944e9e9b8a1bd3e3b5753fba4713a986df9
https://github.com/WebKit/WebKit/commit/c7c0f944e9e9b8a1bd3e3b5753fba4713a986df9
Author: Chris Dumez <cdumez at apple.com>
Date: 2024-07-26 (Fri, 26 Jul 2024)
Changed paths:
M Source/WebCore/Modules/model-element/HTMLModelElement.h
M Source/WebCore/dom/Attr.h
M Source/WebCore/dom/CDATASection.h
M Source/WebCore/dom/CharacterData.h
M Source/WebCore/dom/Comment.h
M Source/WebCore/dom/ContainerNode.cpp
M Source/WebCore/dom/ContainerNode.h
M Source/WebCore/dom/ContainerNodeAlgorithms.cpp
M Source/WebCore/dom/Document.h
M Source/WebCore/dom/DocumentFragment.h
M Source/WebCore/dom/DocumentType.h
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/Node.cpp
M Source/WebCore/dom/Node.h
M Source/WebCore/dom/ProcessingInstruction.h
M Source/WebCore/dom/PseudoElement.h
M Source/WebCore/dom/ShadowRoot.h
M Source/WebCore/dom/StyledElement.h
M Source/WebCore/dom/TemplateContentDocumentFragment.h
M Source/WebCore/dom/Text.h
M Source/WebCore/dom/XMLDocument.h
M Source/WebCore/html/FTPDirectoryDocument.h
M Source/WebCore/html/HTMLAnchorElement.h
M Source/WebCore/html/HTMLAreaElement.cpp
M Source/WebCore/html/HTMLAreaElement.h
M Source/WebCore/html/HTMLArticleElement.h
M Source/WebCore/html/HTMLAttachmentElement.h
M Source/WebCore/html/HTMLAudioElement.h
M Source/WebCore/html/HTMLBDIElement.h
M Source/WebCore/html/HTMLBRElement.h
M Source/WebCore/html/HTMLBaseElement.h
M Source/WebCore/html/HTMLBodyElement.h
M Source/WebCore/html/HTMLButtonElement.h
M Source/WebCore/html/HTMLCanvasElement.h
M Source/WebCore/html/HTMLDListElement.h
M Source/WebCore/html/HTMLDataElement.h
M Source/WebCore/html/HTMLDataListElement.h
M Source/WebCore/html/HTMLDetailsElement.cpp
M Source/WebCore/html/HTMLDetailsElement.h
M Source/WebCore/html/HTMLDialogElement.h
M Source/WebCore/html/HTMLDirectoryElement.h
M Source/WebCore/html/HTMLDivElement.h
M Source/WebCore/html/HTMLDocument.h
M Source/WebCore/html/HTMLElement.h
M Source/WebCore/html/HTMLEmbedElement.h
M Source/WebCore/html/HTMLFieldSetElement.h
M Source/WebCore/html/HTMLFontElement.h
M Source/WebCore/html/HTMLFormControlElement.h
M Source/WebCore/html/HTMLFormElement.h
M Source/WebCore/html/HTMLFrameElement.h
M Source/WebCore/html/HTMLFrameElementBase.h
M Source/WebCore/html/HTMLFrameOwnerElement.h
M Source/WebCore/html/HTMLFrameSetElement.h
M Source/WebCore/html/HTMLHRElement.h
M Source/WebCore/html/HTMLHeadElement.h
M Source/WebCore/html/HTMLHeadingElement.h
M Source/WebCore/html/HTMLHtmlElement.h
M Source/WebCore/html/HTMLIFrameElement.cpp
M Source/WebCore/html/HTMLIFrameElement.h
M Source/WebCore/html/HTMLImageElement.h
M Source/WebCore/html/HTMLInputElement.h
M Source/WebCore/html/HTMLLIElement.h
M Source/WebCore/html/HTMLLabelElement.h
M Source/WebCore/html/HTMLLegendElement.h
M Source/WebCore/html/HTMLLinkElement.h
M Source/WebCore/html/HTMLMapElement.h
M Source/WebCore/html/HTMLMarqueeElement.h
M Source/WebCore/html/HTMLMediaElement.h
M Source/WebCore/html/HTMLMenuElement.h
M Source/WebCore/html/HTMLMetaElement.h
M Source/WebCore/html/HTMLMeterElement.h
M Source/WebCore/html/HTMLModElement.h
M Source/WebCore/html/HTMLOListElement.h
M Source/WebCore/html/HTMLObjectElement.h
M Source/WebCore/html/HTMLOptGroupElement.h
M Source/WebCore/html/HTMLOptionElement.h
M Source/WebCore/html/HTMLOutputElement.cpp
M Source/WebCore/html/HTMLOutputElement.h
M Source/WebCore/html/HTMLParagraphElement.h
M Source/WebCore/html/HTMLParamElement.h
M Source/WebCore/html/HTMLPictureElement.h
M Source/WebCore/html/HTMLPlugInElement.h
M Source/WebCore/html/HTMLPlugInImageElement.h
M Source/WebCore/html/HTMLPreElement.h
M Source/WebCore/html/HTMLProgressElement.h
M Source/WebCore/html/HTMLQuoteElement.h
M Source/WebCore/html/HTMLScriptElement.h
M Source/WebCore/html/HTMLSelectElement.h
M Source/WebCore/html/HTMLSlotElement.h
M Source/WebCore/html/HTMLSourceElement.h
M Source/WebCore/html/HTMLSpanElement.h
M Source/WebCore/html/HTMLStyleElement.h
M Source/WebCore/html/HTMLSummaryElement.h
M Source/WebCore/html/HTMLTableCaptionElement.h
M Source/WebCore/html/HTMLTableCellElement.h
M Source/WebCore/html/HTMLTableColElement.h
M Source/WebCore/html/HTMLTableElement.cpp
M Source/WebCore/html/HTMLTableElement.h
M Source/WebCore/html/HTMLTablePartElement.h
M Source/WebCore/html/HTMLTableRowElement.h
M Source/WebCore/html/HTMLTableSectionElement.h
M Source/WebCore/html/HTMLTemplateElement.h
M Source/WebCore/html/HTMLTextAreaElement.h
M Source/WebCore/html/HTMLTextFormControlElement.h
M Source/WebCore/html/HTMLTimeElement.h
M Source/WebCore/html/HTMLTitleElement.h
M Source/WebCore/html/HTMLTrackElement.h
M Source/WebCore/html/HTMLUListElement.h
M Source/WebCore/html/HTMLUnknownElement.h
M Source/WebCore/html/HTMLVideoElement.cpp
M Source/WebCore/html/HTMLVideoElement.h
M Source/WebCore/html/HTMLWBRElement.h
M Source/WebCore/html/ImageDocument.cpp
M Source/WebCore/html/ImageDocument.h
M Source/WebCore/html/MediaDocument.h
M Source/WebCore/html/ModelDocument.h
M Source/WebCore/html/PDFDocument.cpp
M Source/WebCore/html/PDFDocument.h
M Source/WebCore/html/TextDocument.h
M Source/WebCore/html/shadow/AutoFillButtonElement.h
M Source/WebCore/html/shadow/DataListButtonElement.h
M Source/WebCore/html/shadow/DateTimeEditElement.h
M Source/WebCore/html/shadow/DateTimeFieldElement.h
M Source/WebCore/html/shadow/DateTimeFieldElements.h
M Source/WebCore/html/shadow/DetailsMarkerControl.h
M Source/WebCore/html/shadow/MediaControlTextTrackContainerElement.h
M Source/WebCore/html/shadow/ProgressShadowElement.cpp
M Source/WebCore/html/shadow/ProgressShadowElement.h
M Source/WebCore/html/shadow/SliderThumbElement.h
M Source/WebCore/html/shadow/SpinButtonElement.h
M Source/WebCore/html/shadow/TextControlInnerElements.h
M Source/WebCore/html/shadow/TextPlaceholderElement.h
M Source/WebCore/html/shadow/YouTubeEmbedShadowElement.h
M Source/WebCore/html/track/TextTrackCue.h
M Source/WebCore/html/track/TextTrackCueGeneric.cpp
M Source/WebCore/html/track/VTTCue.h
M Source/WebCore/html/track/WebVTTElement.h
M Source/WebCore/loader/SinkDocument.h
M Source/WebCore/mathml/MathMLAnnotationElement.h
M Source/WebCore/mathml/MathMLElement.h
M Source/WebCore/mathml/MathMLFractionElement.h
M Source/WebCore/mathml/MathMLMathElement.h
M Source/WebCore/mathml/MathMLMencloseElement.h
M Source/WebCore/mathml/MathMLOperatorElement.h
M Source/WebCore/mathml/MathMLPaddedElement.h
M Source/WebCore/mathml/MathMLPresentationElement.h
M Source/WebCore/mathml/MathMLRootElement.h
M Source/WebCore/mathml/MathMLRowElement.h
M Source/WebCore/mathml/MathMLScriptsElement.h
M Source/WebCore/mathml/MathMLSelectElement.h
M Source/WebCore/mathml/MathMLSpaceElement.h
M Source/WebCore/mathml/MathMLTokenElement.h
M Source/WebCore/mathml/MathMLUnderOverElement.h
M Source/WebCore/mathml/MathMLUnknownElement.h
M Source/WebCore/svg/SVGAElement.cpp
M Source/WebCore/svg/SVGAElement.h
M Source/WebCore/svg/SVGAltGlyphDefElement.h
M Source/WebCore/svg/SVGAltGlyphElement.h
M Source/WebCore/svg/SVGAltGlyphItemElement.h
M Source/WebCore/svg/SVGAnimateElement.h
M Source/WebCore/svg/SVGAnimateElementBase.h
M Source/WebCore/svg/SVGAnimateMotionElement.h
M Source/WebCore/svg/SVGAnimateTransformElement.h
M Source/WebCore/svg/SVGAnimationElement.h
M Source/WebCore/svg/SVGCircleElement.h
M Source/WebCore/svg/SVGClipPathElement.h
M Source/WebCore/svg/SVGComponentTransferFunctionElement.h
M Source/WebCore/svg/SVGCursorElement.h
M Source/WebCore/svg/SVGDefsElement.h
M Source/WebCore/svg/SVGDescElement.h
M Source/WebCore/svg/SVGDocument.h
M Source/WebCore/svg/SVGElement.h
M Source/WebCore/svg/SVGEllipseElement.h
M Source/WebCore/svg/SVGFEBlendElement.h
M Source/WebCore/svg/SVGFEColorMatrixElement.h
M Source/WebCore/svg/SVGFEComponentTransferElement.h
M Source/WebCore/svg/SVGFECompositeElement.h
M Source/WebCore/svg/SVGFEConvolveMatrixElement.h
M Source/WebCore/svg/SVGFEDiffuseLightingElement.h
M Source/WebCore/svg/SVGFEDisplacementMapElement.h
M Source/WebCore/svg/SVGFEDistantLightElement.cpp
M Source/WebCore/svg/SVGFEDistantLightElement.h
M Source/WebCore/svg/SVGFEDropShadowElement.h
M Source/WebCore/svg/SVGFEFloodElement.h
M Source/WebCore/svg/SVGFEFuncAElement.cpp
M Source/WebCore/svg/SVGFEFuncAElement.h
M Source/WebCore/svg/SVGFEFuncBElement.cpp
M Source/WebCore/svg/SVGFEFuncBElement.h
M Source/WebCore/svg/SVGFEFuncGElement.cpp
M Source/WebCore/svg/SVGFEFuncGElement.h
M Source/WebCore/svg/SVGFEFuncRElement.cpp
M Source/WebCore/svg/SVGFEFuncRElement.h
M Source/WebCore/svg/SVGFEGaussianBlurElement.h
M Source/WebCore/svg/SVGFEImageElement.h
M Source/WebCore/svg/SVGFELightElement.h
M Source/WebCore/svg/SVGFEMergeElement.h
M Source/WebCore/svg/SVGFEMergeNodeElement.h
M Source/WebCore/svg/SVGFEMorphologyElement.h
M Source/WebCore/svg/SVGFEOffsetElement.h
M Source/WebCore/svg/SVGFEPointLightElement.cpp
M Source/WebCore/svg/SVGFEPointLightElement.h
M Source/WebCore/svg/SVGFESpecularLightingElement.h
M Source/WebCore/svg/SVGFESpotLightElement.cpp
M Source/WebCore/svg/SVGFESpotLightElement.h
M Source/WebCore/svg/SVGFETileElement.h
M Source/WebCore/svg/SVGFETurbulenceElement.h
M Source/WebCore/svg/SVGFilterElement.h
M Source/WebCore/svg/SVGFilterPrimitiveStandardAttributes.h
M Source/WebCore/svg/SVGFontElement.h
M Source/WebCore/svg/SVGFontFaceElement.h
M Source/WebCore/svg/SVGFontFaceFormatElement.h
M Source/WebCore/svg/SVGFontFaceNameElement.h
M Source/WebCore/svg/SVGFontFaceSrcElement.h
M Source/WebCore/svg/SVGFontFaceUriElement.h
M Source/WebCore/svg/SVGForeignObjectElement.h
M Source/WebCore/svg/SVGGElement.h
M Source/WebCore/svg/SVGGeometryElement.h
M Source/WebCore/svg/SVGGlyphElement.h
M Source/WebCore/svg/SVGGlyphRefElement.h
M Source/WebCore/svg/SVGGradientElement.h
M Source/WebCore/svg/SVGGraphicsElement.h
M Source/WebCore/svg/SVGHKernElement.h
M Source/WebCore/svg/SVGImageElement.h
M Source/WebCore/svg/SVGLineElement.h
M Source/WebCore/svg/SVGLinearGradientElement.h
M Source/WebCore/svg/SVGMPathElement.h
M Source/WebCore/svg/SVGMarkerElement.h
M Source/WebCore/svg/SVGMaskElement.h
M Source/WebCore/svg/SVGMetadataElement.h
M Source/WebCore/svg/SVGMissingGlyphElement.h
M Source/WebCore/svg/SVGPathElement.h
M Source/WebCore/svg/SVGPatternElement.h
M Source/WebCore/svg/SVGPolyElement.h
M Source/WebCore/svg/SVGPolygonElement.h
M Source/WebCore/svg/SVGPolylineElement.h
M Source/WebCore/svg/SVGRadialGradientElement.h
M Source/WebCore/svg/SVGRectElement.h
M Source/WebCore/svg/SVGSVGElement.h
M Source/WebCore/svg/SVGScriptElement.h
M Source/WebCore/svg/SVGSetElement.h
M Source/WebCore/svg/SVGStopElement.h
M Source/WebCore/svg/SVGStyleElement.h
M Source/WebCore/svg/SVGSwitchElement.h
M Source/WebCore/svg/SVGSymbolElement.h
M Source/WebCore/svg/SVGTRefElement.h
M Source/WebCore/svg/SVGTSpanElement.h
M Source/WebCore/svg/SVGTextContentElement.h
M Source/WebCore/svg/SVGTextElement.h
M Source/WebCore/svg/SVGTextPathElement.h
M Source/WebCore/svg/SVGTextPositioningElement.h
M Source/WebCore/svg/SVGTitleElement.h
M Source/WebCore/svg/SVGUnknownElement.h
M Source/WebCore/svg/SVGUseElement.h
M Source/WebCore/svg/SVGVKernElement.h
M Source/WebCore/svg/SVGViewElement.h
M Source/WebCore/svg/animation/SVGSMILElement.h
Log Message:
-----------
Use CheckedPtr for DOM tree pointers
https://bugs.webkit.org/show_bug.cgi?id=277060
Reviewed by Ryosuke Niwa.
Use CheckedPtr for DOM tree pointers, for extra safety.
* Source/WebCore/dom/ContainerNode.cpp:
(WebCore::ContainerNode::removeAllChildrenWithScriptAssertion):
(WebCore::ContainerNode::insertBeforeCommon):
* Source/WebCore/dom/ContainerNode.h:
(WebCore::ContainerNode::firstChild const):
(WebCore::ContainerNode::protectedFirstChild const):
(WebCore::ContainerNode::lastChild const):
(WebCore::ContainerNode::protectedLastChild const):
(WebCore::ContainerNode::hasChildNodes const):
(): Deleted.
* Source/WebCore/dom/Node.cpp:
* Source/WebCore/dom/Node.h:
(WebCore::Node::nextSibling const):
(WebCore::Node::protectedNextSibling const):
(WebCore::Node::parentNode const):
Canonical link: https://commits.webkit.org/281399@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list