Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 45ee5a5e7caa1d809c29ce742a6ee21bae07741f
      
https://github.com/WebKit/WebKit/commit/45ee5a5e7caa1d809c29ce742a6ee21bae07741f
  Author: Alicia Boya Garcia <ab...@igalia.com>
  Date:   2025-05-12 (Mon, 12 May 2025)

  Changed paths:
    M Source/JavaScriptCore/API/glib/JSCContext.cpp
    M Source/JavaScriptCore/API/glib/JSCWrapperMap.cpp
    M Source/JavaScriptCore/API/glib/JSCWrapperMap.h
    M Source/WTF/wtf/glib/GRefPtr.h
    M Source/WebKit/UIProcess/API/glib/WebKitBackForwardList.cpp
    M Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
    M Source/WebKit/WPEPlatform/wpe/WPESettings.cpp

  Log Message:
  -----------
  [glib] (Re-)introduce LIFETIME_BOUND for GRefPtr.get()
https://bugs.webkit.org/show_bug.cgi?id=292424

Reviewed by Carlos Garcia Campos and Michael Catanzaro.

This patch adds LIFETIME_BOUND annotation to GRefPtr, which was
temporarily reverted in https://github.com/WebKit/WebKit/pull/44595 due
to build issues.

A new method, GRefPtr.getUnchekedLifetime() is added that doesn't use
LIFETIME_BOUND, especifically for situations where returning a raw
pointer of a GRefPtr about to be destroyed is necessary -- of course,
this is only safe when the object is guaranteed to have at least one
other strong references.

Changes are made to the few functions where the introduction of
LIFETIME_BOUND made them not compile. These changes have also reduced
the number of unnecessary refcount temporary increases in the affected
code.

* Source/JavaScriptCore/API/glib/JSCContext.cpp:
(jsc_context_register_class):
* Source/JavaScriptCore/API/glib/JSCWrapperMap.cpp:
(JSC::WrapperMap::registerClass):
* Source/JavaScriptCore/API/glib/JSCWrapperMap.h:
* Source/WTF/wtf/glib/GRefPtr.h:
(WTF::GRefPtr::getUncheckedLifetime const):
(WTF::GRefPtr::get const): Deleted.
* Source/WebKit/UIProcess/API/glib/WebKitBackForwardList.cpp:
(webkitBackForwardListGetOrCreateItem):
* Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::setCursor):
* Source/WebKit/WPEPlatform/wpe/WPESettings.cpp:
(wpe_settings_get_value):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to