Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 6bf92f788fbb70ae21d4b8b5addcf9a05ac53959
      
https://github.com/WebKit/WebKit/commit/6bf92f788fbb70ae21d4b8b5addcf9a05ac53959
  Author: Simon Pena <[email protected]>
  Date:   2026-02-19 (Thu, 19 Feb 2026)

  Changed paths:
    M Source/WebKit/NetworkProcess/glib/NetworkMDNSRegisterGLib.cpp

  Log Message:
  -----------
  [GLib] Avoid accessing NetworkMDNSRegister after Avahi proxy creation is 
cancelled
https://bugs.webkit.org/show_bug.cgi?id=308222

Reviewed by Philippe Normand.

When the NetworkMDNSRegister destructor runs, it calls
g_cancellable_cancel, which will cancel any ongoing asynchronos calls
where m_cancellable participates.

Calls in NetworkMDNSRegister::registerMDNSName are safe, as they only
access memory they've allocated, but g_dbus_proxy_new_for_bus in the
constructor keeps a pointer to "this" that would have been invalid after
the destructor has completed.

This reorders the callback so that the instance is only accessed when no
errors are reported.

* Source/WebKit/NetworkProcess/glib/NetworkMDNSRegisterGLib.cpp:
(WebKit::NetworkMDNSRegister::NetworkMDNSRegister):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to