<?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>232986</bug_id>
          
          <creation_ts>2021-11-11 00:21:51 -0800</creation_ts>
          <short_desc>[RemoteInspector][Socket] Can&apos;t find the target since r277787</short_desc>
          <delta_ts>2021-11-11 18:28:55 -0800</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>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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="Tomoki Imai">tomoki.imai</reporter>
          <assigned_to name="Tomoki Imai">tomoki.imai</assigned_to>
          <cc>ap</cc>
    
    <cc>don.olmstead</cc>
    
    <cc>ews-watchlist</cc>
    
    <cc>fujii</cc>
    
    <cc>hi</cc>
    
    <cc>joepeck</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>pangle</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1813939</commentid>
    <comment_count>0</comment_count>
    <who name="Tomoki Imai">tomoki.imai</who>
    <bug_when>2021-11-11 00:21:51 -0800</bug_when>
    <thetext>How to reproduce:

- Launch MiniBrowser on the target
- Launch MiniBrowser on the host (WinCairo)
- Try to connect to the target by inspector://.


Expected result:

- The target should be listed.

Actual result:

- &quot;No targets found&quot; message is shown.

This issue is same as bug 226908. r277787 changed WebURLSchemeTask::request()&apos;s return type and caused the issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1813943</commentid>
    <comment_count>1</comment_count>
      <attachid>443918</attachid>
    <who name="Tomoki Imai">tomoki.imai</who>
    <bug_when>2021-11-11 00:28:09 -0800</bug_when>
    <thetext>Created attachment 443918
patch

Patch to fix the issue in the same way as r278748.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1814121</commentid>
    <comment_count>2</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2021-11-11 11:06:05 -0800</bug_when>
    <thetext>Committed r285641 (244142@main): &lt;https://commits.webkit.org/244142@main&gt;

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443918.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1814125</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-11 11:07:49 -0800</bug_when>
    <thetext>&lt;rdar://problem/85307053&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1814146</commentid>
    <comment_count>4</comment_count>
      <attachid>443918</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2021-11-11 11:53:03 -0800</bug_when>
    <thetext>Comment on attachment 443918
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=443918&amp;action=review

&gt; Source/WebKit/ChangeLog:9
&gt; +        Remote Inspector has the same issue as bug 226908.
&gt; +        RemoteInspectorProtocolHandler needs the same fix as r278748.

I haven&apos;t seen that patch at the time, but I don&apos;t see how either of the fixes is correct. Could you please clarify?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1814331</commentid>
    <comment_count>5</comment_count>
    <who name="Tomoki Imai">tomoki.imai</who>
    <bug_when>2021-11-11 18:28:55 -0800</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #4)
&gt; Comment on attachment 443918 [details]
&gt; patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=443918&amp;action=review
&gt; 
&gt; &gt; Source/WebKit/ChangeLog:9
&gt; &gt; +        Remote Inspector has the same issue as bug 226908.
&gt; &gt; +        RemoteInspectorProtocolHandler needs the same fix as r278748.
&gt; 
&gt; I haven&apos;t seen that patch at the time, but I don&apos;t see how either of the
&gt; fixes is correct. Could you please clarify?

Sure, sorry for not explaining in this bugzilla.

(quoted from bug 226908 comment 1)
&gt; r277787 (Bug 226001) changed the return type of 
&gt; WebURLSchemeTask::request() 
&gt; from const WebCore::ResourceRequest&amp; to WebCore::ResourceRequest.
&gt; InspectorResourceURLSchemeHandler::platformStartTask shouldn&apos;t
&gt; hold the reference of temporary object.

Currently, task.request() creates a temporal ResourceRequest, which is destructed immediately after &quot;auto&amp; requestURL = task.request().url();&quot;.
ResourceRequest.url() returns the reference of ResourceRequest.m_url, so it&apos;s also destructed immediately too.
Therefore requestURL becomes a invalid reference to destructed object, which should not be happened. (In this case, it&apos;s recognized as null URL.)

So we changed &quot;auto&amp;&quot; to &quot;auto&quot; to copy the temporal URL.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>443918</attachid>
            <date>2021-11-11 00:28:09 -0800</date>
            <delta_ts>2021-11-11 11:06:06 -0800</delta_ts>
            <desc>patch</desc>
            <filename>bug-232986-1.patch</filename>
            <type>text/plain</type>
            <size>1626</size>
            <attacher name="Tomoki Imai">tomoki.imai</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nIGIvU291cmNlL1dlYktpdC9DaGFu
Z2VMb2cKaW5kZXggNzMxOTEwNzU0ZDYxLi5iOTdkYmUxMGQ5MjggMTAwNjQ0Ci0tLSBhL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMg
KzEsM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