[webkit-changes] [WebKit/WebKit] a08f9d: Use a WeakPtr for InlineCSSStyleDeclaration::m_par...

Chris Dumez noreply at github.com
Thu Mar 9 08:50:53 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: a08f9d20cd5351e682ed7c1749c597490d1dae26
      https://github.com/WebKit/WebKit/commit/a08f9d20cd5351e682ed7c1749c597490d1dae26
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-03-09 (Thu, 09 Mar 2023)

  Changed paths:
    M Source/WebCore/css/PropertySetCSSStyleDeclaration.h
    M Source/WebCore/dom/StyledElement.cpp

  Log Message:
  -----------
  Use a WeakPtr for InlineCSSStyleDeclaration::m_parentElement
https://bugs.webkit.org/show_bug.cgi?id=253629

Reviewed by Darin Adler.

Use a WeakPtr for InlineCSSStyleDeclaration::m_parentElement. This is safer
than keeping a raw pointer and avoids some work in the StyleElement destructor
to clear this pointer.

* Source/WebCore/css/PropertySetCSSStyleDeclaration.h:
(WebCore::PropertySetCSSStyleDeclaration::clearParentElement): Deleted.
* Source/WebCore/dom/StyledElement.cpp:
(WebCore::StyledElement::~StyledElement): Deleted.

Canonical link: https://commits.webkit.org/261440@main




More information about the webkit-changes mailing list