<?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>195362</bug_id>
          
          <creation_ts>2019-03-06 10:06:24 -0800</creation_ts>
          <short_desc>REGRESSION: (r242181) API test DragAndDropTests.ExternalSourcePlainTextToIFrame is Timing out</short_desc>
          <delta_ts>2019-03-11 18:09:20 -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>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=195572</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="Truitt Savell">tsavell</reporter>
          <assigned_to name="youenn fablet">youennf</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>jlewis3</cc>
    
    <cc>lforschler</cc>
    
    <cc>ryanhaddad</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1513062</commentid>
    <comment_count>0</comment_count>
    <who name="Truitt Savell">tsavell</who>
    <bug_when>2019-03-06 10:06:24 -0800</bug_when>
    <thetext>The following API test is timing out on iOS debug

DragAndDropTests.ExternalSourcePlainTextToIFrame

Probable cause:

This began timing out with https://trac.webkit.org/changeset/242181/webkit. I confirmed this using command:

run-api-tests DragAndDropTests.ExternalSourcePlainTextToIFrame --ios-simulator --debug

on r242181 which produces a timeout. Running this on r242180 produces no timeouts.

Timeout

    TestWebKitAPI.DragAndDropTests.ExternalSourcePlainTextToIFrame
        ASSERTION FAILED: areOriginsMatching(origin1, origin2) == (origin1.toString() == origin2.toString())
        ./page/SecurityOrigin.cpp(499) : bool WebCore::originsMatch(const WebCore::SecurityOrigin &amp;, const WebCore::SecurityOrigin &amp;)
        1   0x222720bf9 WTFCrash
        2   0x2267efeeb WTFCrashWithInfo(int, char const*, char const*, int)
        3   0x229430c12 WebCore::originsMatch(WebCore::SecurityOrigin const&amp;, WebCore::SecurityOrigin const&amp;)
        4   0x22913c68e WebCore::DocumentLoader::shouldOpenExternalURLsPolicyToPropagate() const
        5   0x228887b0d WebCore::Document::shouldOpenExternalURLsPolicyToPropagate() const
        6   0x229315cd8 WebCore::DragController::performDragOperation(WebCore::DragData const&amp;)
        7   0x109363210 WebKit::WebPage::performDragControllerAction(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;)
        8   0x1093ee8fd void IPC::callMemberFunctionImpl&lt;WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;), std::__1::tuple&lt;WebKit::DragControllerAction, WebCore::DragData, WebKit::SandboxExtension::Handle, WebKit::SandboxExtension::HandleArray&gt;, 0ul, 1ul, 2ul, 3ul&gt;(WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;), std::__1::tuple&lt;WebKit::DragControllerAction, WebCore::DragData, WebKit::SandboxExtension::Handle, WebKit::SandboxExtension::HandleArray&gt;&amp;&amp;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul, 2ul, 3ul&gt;)
        9   0x1093ee3b0 void IPC::callMemberFunction&lt;WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;), std::__1::tuple&lt;WebKit::DragControllerAction, WebCore::DragData, WebKit::SandboxExtension::Handle, WebKit::SandboxExtension::HandleArray&gt;, std::__1::integer_sequence&lt;unsigned long, 0ul, 1ul, 2ul, 3ul&gt; &gt;(std::__1::tuple&lt;WebKit::DragControllerAction, WebCore::DragData, WebKit::SandboxExtension::Handle, WebKit::SandboxExtension::HandleArray&gt;&amp;&amp;, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;))
        10  0x1093cf554 void IPC::handleMessage&lt;Messages::WebPage::PerformDragControllerAction, WebKit::WebPage, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;)&gt;(IPC::Decoder&amp;, WebKit::WebPage*, void (WebKit::WebPage::*)(WebKit::DragControllerAction, WebCore::DragData const&amp;, WebKit::SandboxExtension::Handle&amp;&amp;, WebKit::SandboxExtension::HandleArray&amp;&amp;))
        11  0x1093be8d8 WebKit::WebPage::didReceiveWebPageMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
        12  0x10936606e WebKit::WebPage::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
        13  0x10834524a IPC::MessageReceiverMap::dispatchMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
        14  0x109004b1d WebKit::WebProcess::didReceiveMessage(IPC::Connection&amp;, IPC::Decoder&amp;)
        15  0x1082f851c IPC::Connection::dispatchMessage(IPC::Decoder&amp;)
        16  0x1082eadf1 IPC::Connection::dispatchMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)
        17  0x1082f92e7 IPC::Connection::dispatchOneIncomingMessage()
        18  0x108319f78 IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14::operator()()
        19  0x108319e89 WTF::Function&lt;void ()&gt;::CallableWrapper&lt;IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr&lt;IPC::Decoder, std::__1::default_delete&lt;IPC::Decoder&gt; &gt;)::$_14&gt;::call()
        20  0x22274b0bd WTF::Function&lt;void ()&gt;::operator()() const
        21  0x2227aa823 WTF::RunLoop::performWork()
        22  0x2227ab1b4 WTF::RunLoop::performWork(void*)
        23  0x10e267721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
        24  0x10e266f93 __CFRunLoopDoSources0
        25  0x10e26163f __CFRunLoopRun
        26  0x10e260e11 CFRunLoopRunSpecific
        27  0x107d34322 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
        28  0x107d34492 -[NSRunLoop(NSRunLoop) run]
        29  0x10fa58812 _xpc_objc_main
        30  0x10fa5acbd xpc_main
        31  0x108778497 WebKit::XPCServiceMain(int, char const**)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513753</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-03-07 15:35:09 -0800</bug_when>
    <thetext>What is the next step here? 8 days ago seems like maybe roll back?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513758</commentid>
    <comment_count>2</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2019-03-07 15:51:07 -0800</bug_when>
    <thetext>(In reply to Truitt Savell from comment #0)
&gt; 
&gt; This began timing out with https://trac.webkit.org/changeset/242181/webkit

That change caused a *different* assertion, as mentioned in https://bugs.webkit.org/show_bug.cgi?id=195126

Also as mentioned in https://bugs.webkit.org/show_bug.cgi?id=195126, I identified it as a bogus assertion so I removed it in https://trac.webkit.org/changeset/242249/webkit

That was 7-8 days ago.

The assertion being reported in this bug is a different one that Youenn re-added in https://trac.webkit.org/changeset/242283/webkit</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513759</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2019-03-07 15:51:48 -0800</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #1)
&gt; What is the next step here? 8 days ago seems like maybe roll back?

The regression caused 8 days ago was fixed 8 days ago.

This assertion was added 6 days ago in https://trac.webkit.org/changeset/242283/webkit

I would suggest contacting Youenn about that instead of me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1513891</commentid>
    <comment_count>4</comment_count>
      <attachid>363976</attachid>
    <who name="youenn fablet">youennf</who>
    <bug_when>2019-03-07 19:50:51 -0800</bug_when>
    <thetext>Created attachment 363976
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515130</commentid>
    <comment_count>5</comment_count>
      <attachid>363976</attachid>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2019-03-11 17:37:13 -0700</bug_when>
    <thetext>Comment on attachment 363976
Patch

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

&gt; Source/WebCore/page/SecurityOrigin.cpp:499
&gt; +    ASSERT(!areOriginsMatching(origin1, origin2) || (origin1.toString() == origin2.toString()));

This assertion says that matching origins must have identical toString() results. Why is this invariant important? This should be explained in a comment, as otherwise someone will just remove it when it starts to fail after another change.

For example, if toString() begins to output file URL host, which it kind of is supposed to do, I&apos;m not sure how it follows that we would have to treat the URLs as not matching - in fact, file://localhost/ is usually same as file://. This assertion alone does very little to explain why a change like the former would be wrong.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515131</commentid>
    <comment_count>6</comment_count>
    <who name="youenn fablet">youennf</who>
    <bug_when>2019-03-11 17:40:38 -0700</bug_when>
    <thetext>(In reply to Alexey Proskuryakov from comment #5)
&gt; Comment on attachment 363976 [details]
&gt; Patch
&gt; 
&gt; View in context:
&gt; https://bugs.webkit.org/attachment.cgi?id=363976&amp;action=review
&gt; 
&gt; &gt; Source/WebCore/page/SecurityOrigin.cpp:499
&gt; &gt; +    ASSERT(!areOriginsMatching(origin1, origin2) || (origin1.toString() == origin2.toString()));
&gt; 
&gt; This assertion says that matching origins must have identical toString()
&gt; results. Why is this invariant important? This should be explained in a
&gt; comment, as otherwise someone will just remove it when it starts to fail
&gt; after another change.
&gt; 
&gt; For example, if toString() begins to output file URL host, which it kind of
&gt; is supposed to do, I&apos;m not sure how it follows that we would have to treat
&gt; the URLs as not matching - in fact, file://localhost/ is usually same as
&gt; file://. This assertion alone does very little to explain why a change like
&gt; the former would be wrong.

Agreed, https://bugs.webkit.org/show_bug.cgi?id=195572 is planning to rename originsMatch to originSerializationsMatch which hopefully makes it clearer.
Above bug should also remove some current uses of originsMatch as I believe, SecurityOrigin::isSameOriginAs might be better in most cases.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515161</commentid>
    <comment_count>7</comment_count>
      <attachid>363976</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-03-11 18:08:23 -0700</bug_when>
    <thetext>Comment on attachment 363976
Patch

Clearing flags on attachment: 363976

Committed r242761: &lt;https://trac.webkit.org/changeset/242761&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515162</commentid>
    <comment_count>8</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-03-11 18:08:25 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1515163</commentid>
    <comment_count>9</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2019-03-11 18:09:20 -0700</bug_when>
    <thetext>&lt;rdar://problem/48792151&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>363976</attachid>
            <date>2019-03-07 19:50:51 -0800</date>
            <delta_ts>2019-03-11 18:08:23 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-195362-20190307195050.patch</filename>
            <type>text/plain</type>
            <size>1504</size>
            <attacher name="youenn fablet">youennf</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQyNTk2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggZGU2NGFlOGM3M2Y1NTNk
YWY3OGY2MzZmYjdhZWYyZmJhMDA4NGEwNC4uZDJhZGZlMmVjMjhkYzAwYTc1ZjAyZjkyNzA2YjEz
MjJkZGViOTkwMSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSwzICsxLDE2IEBACisyMDE5LTAzLTA3ICBZb3Vl
bm4gRmFibGV0ICA8eW91ZW5uQGFwcGxlLmNvbT4KKworICAgICAgICBSRUdSRVNTSU9OOiAocjI0
MjE4MSkgQVBJIHRlc3QgRHJhZ0FuZERyb3BUZXN0cy5FeHRlcm5hbFNvdXJjZVBsYWluVGV4dFRv
SUZyYW1lIGlzIFRpbWluZyBvdXQKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hv
d19idWcuY2dpP2lkPTE5NTM2MgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEp
LgorCisgICAgICAgIENvdmVyZWQgYnkgQVBJIHRlc3Qgbm8gbG9uZ2VyIGNyYXNoaW5nL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