<?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>240364</bug_id>
          
          <creation_ts>2022-05-12 17:39:43 -0700</creation_ts>
          <short_desc>-Wunused-result in WebCoreSupport/WebContextMenuClient.cpp</short_desc>
          <delta_ts>2022-05-12 18:43:14 -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>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=240078</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</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>cdumez</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1868595</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-12 17:39:43 -0700</bug_when>
    <thetext>Looks like https://github.com/WebKit/WebKit/pull/499 &quot;Annotate more String member functions with WARN_UNUSED_RETURN&quot; uncovered a bug in WebContextMenuClient

[242/300] Building CXX object Source/WebKit/CMakeFiles/Web...ces/WebKit/unified-sources/UnifiedSource-54928a2b-34.cpp.o
In file included from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-34.cpp:3:
/home/mcatanzaro/Projects/WebKit/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp: In member function ‘virtual void WebKit::WebContextMenuClient::searchWithGoogle(const WebCore::Frame*)’:
/home/mcatanzaro/Projects/WebKit/Source/WebKit/WebProcess/WebCoreSupport/WebContextMenuClient.cpp:62:35: warning: ignoring return value of ‘WTF::String WTF::String::stripWhiteSpace() const’, declared with attribute ‘warn_unused_result’ [-Wunused-result]
   62 |     searchString.stripWhiteSpace();
      |                                   ^
In file included from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/text/AtomString.h:27,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/text/StringHash.h:25,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/text/AtomStringTable.h:27,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/Threading.h:51,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/WeakPtr.h:31,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/text/TextStream.h:33,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/ObjectIdentifier.h:32,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/FrameIdentifier.h:28,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/FrameLoaderClient.h:32,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/AccessibilityObjectInterface.h:30,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/AccessibilityObject.h:32,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/AXObjectCache.h:30,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WebCore/PrivateHeaders/WebCore/ChromeClient.h:24,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:29,
                 from /home/mcatanzaro/Projects/WebKit/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:28,
                 from /home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/DerivedSources/WebKit/unified-sources/UnifiedSource-54928a2b-34.cpp:1:
/home/mcatanzaro/Projects/WebKit/WebKitBuild/GNOME-gtk3/WTF/Headers/wtf/text/WTFString.h:208:50: note: declared here
  208 |     WTF_EXPORT_PRIVATE String WARN_UNUSED_RETURN stripWhiteSpace() const;
      |                                                  ^~~~~~~~~~~~~~~</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868598</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-12 17:46:35 -0700</bug_when>
    <thetext>It&apos;s guarded by a #if !PLATFORM(COCOA) condition, which is why Chris didn&apos;t notice when cooking the original change. For GTK/WPE there is no way to ever access this code as we don&apos;t expose that context menu item. It looks like we only have context menu tests for macOS and GTK, so I won&apos;t attempt to write a test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868600</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2022-05-12 17:48:49 -0700</bug_when>
    <thetext>Nice :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868601</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2022-05-12 17:51:35 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/606</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868616</commentid>
    <comment_count>4</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-05-12 18:42:05 -0700</bug_when>
    <thetext>Committed r294137 (250507@main): &lt;https://commits.webkit.org/250507@main&gt;

Reviewed commits have been landed. Closing PR #606 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1868617</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-12 18:43:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/93215506&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>