[webkit-changes] [WebKit/WebKit] d912bb: Use WeakRef instead of CheckedPtr for WebExtension...

Chris Dumez noreply at github.com
Tue Dec 19 15:36:26 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d912bb4b043eb727cc6e14223f3ae0e563222d65
      https://github.com/WebKit/WebKit/commit/d912bb4b043eb727cc6e14223f3ae0e563222d65
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-12-19 (Tue, 19 Dec 2023)

  Changed paths:
    M Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIPortCocoa.mm
    M Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIPort.h

  Log Message:
  -----------
  Use WeakRef instead of CheckedPtr for WebExtensionAPIPort
https://bugs.webkit.org/show_bug.cgi?id=266656

Reviewed by Timothy Hatcher.

Use WeakRef instead of CheckedPtr for WebExtensionAPIPort for storage
in containers. This generates more actionable crashes.

Also make the constructors private since the class is refcounted.

* Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIPortCocoa.mm:
(WebKit::WebExtensionAPIPort::get):
(WebKit::WebExtensionAPIPort::add):
(WebKit::WebExtensionAPIPort::remove):
* Source/WebKit/WebProcess/Extensions/API/WebExtensionAPIPort.h:
(WebKit::WebExtensionAPIPort::~WebExtensionAPIPort):

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




More information about the webkit-changes mailing list