<?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>215880</bug_id>
          
          <creation_ts>2020-08-26 23:11:15 -0700</creation_ts>
          <short_desc>[GTK] `webkit_web_extension_send_message_to_context` et al. abusing async semantics</short_desc>
          <delta_ts>2020-08-27 05:12:27 -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>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk</keywords>
          <priority>P3</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Gratton">mike</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bugs-noreply</cc>
    
    <cc>cgarcia</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1683295</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Gratton">mike</who>
    <bug_when>2020-08-26 23:11:15 -0700</bug_when>
    <thetext>The docs for the calls `webkit_web_extension_send_message_to_context` and `webkit_web_view_send_message_to_page` state:

&gt; If you don&apos;t expect any reply, or you simply want to ignore it, you can pass NULL as callback.

This is probably convenient for people programming in C, but for people programming using vala or language bindings that provide high-level constructs to handle async calls, this is impossible to do. In these cases WebKitGTK will either always emit a &quot;Message foo was not handled&quot; warning, or to silence the warning must always send a response back, even when not required, increasing latency.

Can the warning be removed, or a proper flag introduced, or something?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683304</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Gratton">mike</who>
    <bug_when>2020-08-26 23:54:18 -0700</bug_when>
    <thetext>Also `webkit_web_page_send_message_to_view`.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683339</commentid>
    <comment_count>2</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2020-08-27 04:05:57 -0700</bug_when>
    <thetext>hmm, I think we need to add send_with_no_reply for bindings then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1683343</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Gratton">mike</who>
    <bug_when>2020-08-27 05:12:27 -0700</bug_when>
    <thetext>That would work, but it would also be convenient to be able to specify either/or with a bool or a flag or something.

`send_full` maybe?</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>