[webkit-changes] [WebKit/WebKit] 575728: [GTK] Use a weak reference of web view in webkitWe...

Carlos Garcia Campos noreply at github.com
Fri Jan 27 22:44:03 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5757289eb640e50ec21bcbecb19aaaee0877ed43
      https://github.com/WebKit/WebKit/commit/5757289eb640e50ec21bcbecb19aaaee0877ed43
  Author: Carlos Garcia Campos <cgarcia at igalia.com>
  Date:   2023-01-27 (Fri, 27 Jan 2023)

  Changed paths:
    M Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp
    M Source/WebKit/UIProcess/API/glib/WebKitIconLoadingClient.cpp

  Log Message:
  -----------
  [GTK] Use a weak reference of web view in webkitWebViewGetLoadDecisionForIcon
https://bugs.webkit.org/show_bug.cgi?id=251266

Reviewed by Michael Catanzaro.

We don't want to delay the dispose of a web view because an icon load
decision is still pending, so let's use a weak reference instead of a
strong one. This fixes memory leaks reported by unit tests with 2022 API
now that favicons are enabled by default.

* Source/WebKit/UIProcess/API/glib/WebKitFaviconDatabase.cpp:
(webkitFaviconDatabaseGetLoadDecisionForIcon):
* Source/WebKit/UIProcess/API/glib/WebKitIconLoadingClient.cpp:

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




More information about the webkit-changes mailing list