<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>276180</bug_id>
          
          <creation_ts>2024-07-03 10:23:19 -0700</creation_ts>
          <short_desc>WebKitDOMEventTarget.h:95: Warning: WebKit2WebExtension: invalid &quot;scope&quot; annotation: only valid on callback parameters</short_desc>
          <delta_ts>2024-07-03 13:37:42 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>Other</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Catanzaro">mcatanzaro</reporter>
          <assigned_to name="Michael Catanzaro">mcatanzaro</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>mcatanzaro</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2044470</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-07-03 10:23:19 -0700</bug_when>
    <thetext>Since https://gitlab.gnome.org/GNOME/gobject-introspection/-/merge_requests/477 it&apos;s no longer possible to build for GTK 3 because we have fatal introspection warnings enabled:

Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMEventTarget.h:95: Warning: WebKit2WebExtension: invalid &quot;scope&quot; annotation: only valid on callback parameters

Emmanuele recommends using (type gpointer) for the GCallback parameter of webkit_dom_event_target_remove_event_listener(), since it won&apos;t be called and is therefore not functioning as a callback.

Also:

&quot;&quot;&quot;
the `(scope async)` on add_event_listener() is also broken, because it&apos;s not an async function; but since the function is missing a GDestroyNotify to begin with, there&apos;s no way to properly annotate it
`(scope forever)` is the closest option, but that&apos;ll leak anything that tries to use it
&quot;&quot;&quot;

But I&apos;ll leave this broken because it&apos;s not clear whether it&apos;s fixable and this API is deprecated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2044482</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2024-07-03 11:21:04 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/30446</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2044531</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2024-07-03 13:37:40 -0700</bug_when>
    <thetext>Committed 280639@main (fff1b1773bff): &lt;https://commits.webkit.org/280639@main&gt;

Reviewed commits have been landed. Closing PR #30446 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>