[webkit-changes] [WebKit/WebKit] b14740: ControlPart not contains a raw pointer to ControlF...

Ryosuke Niwa noreply at github.com
Tue Oct 1 17:39:59 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b14740d7c2bb259957b01850ee6635fe2297fd17
      https://github.com/WebKit/WebKit/commit/b14740d7c2bb259957b01850ee6635fe2297fd17
  Author: Ryosuke Niwa <rniwa at webkit.org>
  Date:   2024-10-01 (Tue, 01 Oct 2024)

  Changed paths:
    M Source/WebCore/platform/graphics/controls/ControlPart.cpp
    M Source/WebCore/platform/graphics/controls/ControlPart.h

  Log Message:
  -----------
  ControlPart not contains a raw pointer to ControlFactory
https://bugs.webkit.org/show_bug.cgi?id=280709

Reviewed by Chris Dumez.

Use a RefPtr instead of a raw pointer. This won't lead to memory leak since DrawControlPart::apply
is the only place where setOverrideControlFactory is called but it immediately clears it to nullptr.

* Source/WebCore/platform/graphics/controls/ControlPart.cpp:
(WebCore::ControlPart::setOverrideControlFactory):
* Source/WebCore/platform/graphics/controls/ControlPart.h:

Canonical link: https://commits.webkit.org/284531@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