<?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>200986</bug_id>
          
          <creation_ts>2019-08-21 10:40:26 -0700</creation_ts>
          <short_desc>Crash under StringImpl::~StringImpl() in NetworkProcess::deleteWebsiteDataForRegistrableDomains()</short_desc>
          <delta_ts>2019-08-21 13:02:44 -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>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="Chris Dumez">cdumez</reporter>
          <assigned_to name="Chris Dumez">cdumez</assigned_to>
          <cc>achristensen</cc>
    
    <cc>beidson</cc>
    
    <cc>bfulgham</cc>
    
    <cc>commit-queue</cc>
    
    <cc>ggaren</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wilander</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1563549</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-21 10:40:26 -0700</bug_when>
    <thetext>Crash under StringImpl::~StringImpl() in NetworkProcess::deleteWebsiteDataForRegistrableDomains():
Thread[0] EXC_BAD_ACCESS (SIGSEGV) (KERN_INVALID_ADDRESS at 0x656e6e6f43726576 -&gt; 0x0000006f43726576 (possible pointer authentication failure))
ok
[  0] 0x00000001adf143f4 JavaScriptCore`WTF::StringImpl::~StringImpl() [inlined] WTF::Function&lt;void (WTF::ExternalStringImpl*, void*, unsigned int)&gt;::operator()(WTF::ExternalStringImpl*, void*, unsigned int) const + 4 at Function.h:79:35

     0x00000001adf143e4:      and x8, x8, #0x1
     0x00000001adf143e8:      lsl w8, w9, w8
     0x00000001adf143ec:      add w3, w8, #0x18        ; =0x18 
     0x00000001adf143f0:      ldr x0, [x19, #0x18]
 -&gt;  0x00000001adf143f4:      ldr x8, [x0]
     0x00000001adf143f8:    ldraa x9, [x8, #0x10]!
     0x00000001adf143fc:     movk x8, #0x6e56, lsl #48
     0x00000001adf14400:      mov x1, x19
     0x00000001adf14404:    blraa x9, x8

[  0] 0x00000001adf143f0 JavaScriptCore`WTF::StringImpl::~StringImpl() [inlined] WTF::ExternalStringImpl::freeExternalBuffer(void*, unsigned int) at ExternalStringImpl.h:50
[  0] 0x00000001adf143f0 JavaScriptCore`WTF::StringImpl::~StringImpl() + 168 at StringImpl.cpp:138
       134 	        return;
       135 	    }
       136 	    if (ownership == BufferExternal) {
       137 	        auto* external = static_cast&lt;ExternalStringImpl*&gt;(this);
    -&gt; 138 	        external-&gt;freeExternalBuffer(const_cast&lt;LChar*&gt;(m_data8), sizeInBytes());
       139 	        external-&gt;m_free.~ExternalStringImplFreeFunction();
       140 	        return;
       141 	    }
       142 	
    
[  1] 0x00000001adf1449f JavaScriptCore`WTF::StringImpl::destroy(WTF::StringImpl*) [inlined] WTF::StringImpl::~StringImpl() + 3 at StringImpl.cpp:108:1
       104 	
       105 	StringImpl::StaticStringImpl StringImpl::s_emptyAtomString(&quot;&quot;, StringImpl::StringAtom);
       106 	
       107 	StringImpl::~StringImpl()
    -&gt; 108 	{
       109 	    ASSERT(!isStatic());
       110 	
       111 	    StringView::invalidate(*this);
       112 	
    
[  1] 0x00000001adf1449c JavaScriptCore`WTF::StringImpl::destroy(WTF::StringImpl*) + 12 at StringImpl.cpp:150
       146 	}
       147 	
       148 	void StringImpl::destroy(StringImpl* stringImpl)
       149 	{
    -&gt; 150 	    stringImpl-&gt;~StringImpl();
       151 	    fastFree(stringImpl);
       152 	}
       153 	
       154 	Ref&lt;StringImpl&gt; StringImpl::createFromLiteral(const char* characters, unsigned length)
    
[  2] 0x00000001adf1449f JavaScriptCore`WTF::StringImpl::destroy(WTF::StringImpl*) [inlined] WTF::StringImpl::~StringImpl() + 3 at StringImpl.cpp:108:1
       104 	
       105 	StringImpl::StaticStringImpl StringImpl::s_emptyAtomString(&quot;&quot;, StringImpl::StringAtom);
       106 	
       107 	StringImpl::~StringImpl()
    -&gt; 108 	{
       109 	    ASSERT(!isStatic());
       110 	
       111 	    StringView::invalidate(*this);
       112 	
    
[  2] 0x00000001adf1449c JavaScriptCore`WTF::StringImpl::destroy(WTF::StringImpl*) + 12 at StringImpl.cpp:150
       146 	}
       147 	
       148 	void StringImpl::destroy(StringImpl* stringImpl)
       149 	{
    -&gt; 150 	    stringImpl-&gt;~StringImpl();
       151 	    fastFree(stringImpl);
       152 	}
       153 	
       154 	Ref&lt;StringImpl&gt; StringImpl::createFromLiteral(const char* characters, unsigned length)
    
ok
[  3] 0x00000001a676a1d7 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] WTF::StringImpl::deref() + 3 at StringImpl.h:1076:9
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] void WTF::derefIfNotNull&lt;WTF::StringImpl&gt;(WTF::StringImpl*) at RefPtr.h:44
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;::~RefPtr() at RefPtr.h:69
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;::~RefPtr() at RefPtr.h:69
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;::operator=(WTF::RefPtr&lt;WTF::StringImpl, WTF::DumbPtrTraits&lt;WTF::StringImpl&gt; &gt;&amp;&amp;) at RefPtr.h:165
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) [inlined] WTF::String::operator=(WTF::String&amp;&amp;) at WTFString.h:134
[  3] 0x00000001a676a1d4 WebKit`WebKit::NetworkProcess::deleteWebsiteDataForRegistrableDomains(PAL::SessionID, WTF::OptionSet&lt;WebKit::WebsiteDataType&gt;, WTF::HashMap&lt;WebCore::RegistrableDomain, WebKit::WebsiteDataToRemove, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt;, WTF::HashTraits&lt;WebKit::WebsiteDataToRemove&gt; &gt;&amp;&amp;, bool, WTF::CompletionHandler&lt;void (WTF::HashSet&lt;WebCore::RegistrableDomain, WebCore::RegistrableDomain::RegistrableDomainHash, WTF::HashTraits&lt;WebCore::RegistrableDomain&gt; &gt; const&amp;)&gt;&amp;&amp;) + 2356 at NetworkProcess.cpp:1739
       1735	    }
       1736	#endif
       1737	    
       1738	#if ENABLE(SERVICE_WORKER)
    -&gt; 1739	    path = m_swDatabasePaths.get(sessionID);
       1740	    if (!path.isEmpty() &amp;&amp; websiteDataTypes.contains(WebsiteDataType::ServiceWorkerRegistrations)) {
       1741	        swServerForSession(sessionID).getOriginsWithRegistrations([this, sessionID, domainsToDeleteAllButCookiesFor, callbackAggregator = callbackAggregator.copyRef()](const HashSet&lt;SecurityOriginData&gt;&amp; securityOrigins) mutable {
       1742	            for (auto&amp; securityOrigin : securityOrigins) {
       1743	                if (!domainsToDeleteAllButCookiesFor.contains(RegistrableDomain::uncheckedCreateFromHost(securityOrigin.host)))
    
[  4] 0x00000001a67b8de7 WebKit`WTF::Detail::CallableWrapper&lt;WebKit::ResourceLoadStatisticsStore::removeDataRecords(WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::$_5, void&gt;::call() [inlined] WebKit::ResourceLoadStatisticsStore::removeDataRecords(WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::$_5::operator()() + 115 at ResourceLoadStatisticsStore.cpp:209:16
       205 	
       206 	    setDataRecordsBeingRemoved(true);
       207 	
       208 	    RunLoop::main().dispatch([store = makeRef(m_store), domainsToRemoveWebsiteDataFor = crossThreadCopy(domainsToRemoveWebsiteDataFor), completionHandler = WTFMove(completionHandler), weakThis = makeWeakPtr(*this), shouldNotifyPagesWhenDataRecordsWereScanned = m_parameters.shouldNotifyPagesWhenDataRecordsWereScanned, workQueue = m_workQueue.copyRef()] () mutable {
    -&gt; 209 	        store-&gt;deleteWebsiteDataForRegistrableDomains(WebResourceLoadStatisticsStore::monitoredDataTypes(), WTFMove(domainsToRemoveWebsiteDataFor), shouldNotifyPagesWhenDataRecordsWereScanned, [completionHandler = WTFMove(completionHandler), weakThis = WTFMove(weakThis), workQueue = workQueue.copyRef()](const HashSet&lt;RegistrableDomain&gt;&amp; domainsWithDeletedWebsiteData) mutable {
       210 	            workQueue-&gt;dispatch([domainsWithDeletedWebsiteData = crossThreadCopy(domainsWithDeletedWebsiteData), completionHandler = WTFMove(completionHandler), weakThis = WTFMove(weakThis)] () mutable {
       211 	                if (!weakThis) {
       212 	                    completionHandler();
       213 	                    return;
    
[  4] 0x00000001a67b8d74 WebKit`WTF::Detail::CallableWrapper&lt;WebKit::ResourceLoadStatisticsStore::removeDataRecords(WTF::CompletionHandler&lt;void ()&gt;&amp;&amp;)::$_5, void&gt;::call() + 32 at Function.h:52
[  5] 0x00000001adf0fdd3 JavaScriptCore`WTF::RunLoop::performWork() [inlined] WTF::Function&lt;void ()&gt;::operator()() const + 19 at Function.h:79:35
[  5] 0x00000001adf0fdc0 JavaScriptCore`WTF::RunLoop::performWork() + 252 at RunLoop.cpp:106
       102 	
       103 	            function = m_functionQueue.takeFirst();
       104 	        }
       105 	
    -&gt; 106 	        function();
       107 	    }
       108 	
       109 	    for (size_t functionsHandled = 1; functionsHandled &lt; functionsToHandle; ++functionsHandled) {
       110 	        Function&lt;void ()&gt; function;
    
[  6] 0x00000001adf100a3 JavaScriptCore`WTF::RunLoop::performWork(void*) + 39 at RunLoopCF.cpp:38:37
       34  	
       35  	void RunLoop::performWork(void* context)
       36  	{
       37  	    AutodrainedPool pool;
    -&gt; 38  	    static_cast&lt;RunLoop*&gt;(context)-&gt;performWork();
       39  	}
       40  	
       41  	RunLoop::RunLoop()
       42  	    : m_runLoop(CFRunLoopGetCurrent())
    
ok
[  7] 0x000000019f058b3f CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 27 at CFRunLoop.c:1922:9
       1918	
       1919	static void __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__(void (*)(void *), void *) __attribute__((noinline));
       1920	static void __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__(void (*perform)(void *), void *info) {
       1921	    if (perform) {
    -&gt; 1922	        perform(info);
       1923	    }
       1924	    __asm __volatile__(&quot;&quot;); // thwart tail-call optimization
       1925	}
       1926</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563550</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-21 10:40:41 -0700</bug_when>
    <thetext>&lt;rdar://problem/32850192&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563556</commentid>
    <comment_count>2</comment_count>
      <attachid>376894</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-21 10:56:26 -0700</bug_when>
    <thetext>Created attachment 376894
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563568</commentid>
    <comment_count>3</comment_count>
      <attachid>376894</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2019-08-21 11:10:17 -0700</bug_when>
    <thetext>Comment on attachment 376894
Patch

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

&gt; Source/WebKit/ChangeLog:11
&gt; +        does not take care of this for you, despite its name (the createCrossThreadTask() function does though).

Ugh!

&gt; Source/WebKit/NetworkProcess/NetworkProcess.cpp:1364
&gt;              RunLoop::main().dispatch([callbackAggregator = WTFMove(callbackAggregator), securityOrigins = indexedDatabaseOrigins(path)] {

This makes sense to me; path is created on the main thread, and needs to be copied for use in the cross-thread task.

&gt; Source/WebKit/NetworkProcess/NetworkProcess.cpp:1734
&gt; +            RunLoop::main().dispatch([this, sessionID, domainsToDeleteAllButCookiesFor = WTFMove(domainsToDeleteAllButCookiesFor), callbackAggregator = callbackAggregator.copyRef(), securityOrigins = indexedDatabaseOrigins(path)] {

So it looks like we had this thread-transfer backwards in the original code. I wonder how we can make it harder to avoid this problem.

I understand why we need to crossThreadCopy path (created on the main thread) to the cross-thread task (line 1733), but why is it okay to WTFMove that cross-thread copied memory back to the main thread on line 1734?

&gt; Source/WebKit/NetworkProcess/NetworkProcess.cpp:1878
&gt; +        postStorageTask(CrossThreadTask([this, callbackAggregator = callbackAggregator.copyRef(), path = crossThreadCopy(path)]() mutable {

Again, this one makes sense.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563592</commentid>
    <comment_count>4</comment_count>
      <attachid>376894</attachid>
    <who name="Chris Dumez">cdumez</who>
    <bug_when>2019-08-21 11:45:13 -0700</bug_when>
    <thetext>Comment on attachment 376894
Patch

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

&gt;&gt; Source/WebKit/NetworkProcess/NetworkProcess.cpp:1734
&gt;&gt; +            RunLoop::main().dispatch([this, sessionID, domainsToDeleteAllButCookiesFor = WTFMove(domainsToDeleteAllButCookiesFor), callbackAggregator = callbackAggregator.copyRef(), securityOrigins = indexedDatabaseOrigins(path)] {
&gt; 
&gt; So it looks like we had this thread-transfer backwards in the original code. I wonder how we can make it harder to avoid this problem.
&gt; 
&gt; I understand why we need to crossThreadCopy path (created on the main thread) to the cross-thread task (line 1733), but why is it okay to WTFMove that cross-thread copied memory back to the main thread on line 1734?

Technically, we could crossThreadCopy() both, however, I know WTFMove() is safe here because I have just isolatedCopied the data structure already and I did not pass it to anybody else.
It is safe to WTFMove() a String to another thread if:
1. RefCount is 1 (i.e. String is not shared with anybody else)
and
2. String is not atomized

See String::isSafeToSendToAnotherThread().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563600</commentid>
    <comment_count>5</comment_count>
      <attachid>376894</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2019-08-21 12:02:54 -0700</bug_when>
    <thetext>Comment on attachment 376894
Patch

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

r=me

&gt;&gt;&gt; Source/WebKit/NetworkProcess/NetworkProcess.cpp:1734
&gt;&gt;&gt; +            RunLoop::main().dispatch([this, sessionID, domainsToDeleteAllButCookiesFor = WTFMove(domainsToDeleteAllButCookiesFor), callbackAggregator = callbackAggregator.copyRef(), securityOrigins = indexedDatabaseOrigins(path)] {
&gt;&gt; 
&gt;&gt; So it looks like we had this thread-transfer backwards in the original code. I wonder how we can make it harder to avoid this problem.
&gt;&gt; 
&gt;&gt; I understand why we need to crossThreadCopy path (created on the main thread) to the cross-thread task (line 1733), but why is it okay to WTFMove that cross-thread copied memory back to the main thread on line 1734?
&gt; 
&gt; Technically, we could crossThreadCopy() both, however, I know WTFMove() is safe here because I have just isolatedCopied the data structure already and I did not pass it to anybody else.
&gt; It is safe to WTFMove() a String to another thread if:
&gt; 1. RefCount is 1 (i.e. String is not shared with anybody else)
&gt; and
&gt; 2. String is not atomized
&gt; 
&gt; See String::isSafeToSendToAnotherThread().

Sounds good.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563643</commentid>
    <comment_count>6</comment_count>
      <attachid>376894</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-08-21 13:02:42 -0700</bug_when>
    <thetext>Comment on attachment 376894
Patch

Clearing flags on attachment: 376894

Committed r248959: &lt;https://trac.webkit.org/changeset/248959&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1563644</commentid>
    <comment_count>7</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2019-08-21 13:02:44 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>376894</attachid>
            <date>2019-08-21 10:56:26 -0700</date>
            <delta_ts>2019-08-21 13:02:42 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-200986-20190821105625.patch</filename>
            <type>text/plain</type>
            <size>4852</size>
            <attacher name="Chris Dumez">cdumez</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjQ4OTQyCmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IDg4MmUzNWEzODRlZTk2ZjZk
YjUyNjNhOWQ5NWUxZjExNDcwMTc1NGMuLmEyN2I3NWYwOGUxOTY0ODQ0NzhhYTI2YTIyZWI0NTU3
YjYwNTk4Y2MgMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMjAgQEAKKzIwMTktMDgtMjEgIENocmlzIER1
bWV6ICA8Y2R1bWV6QGFwcGxlLmNvbT4KKworICAgICAgICBDcmFzaCB1bmRlciBTdHJpbmdJbXBs
Ojp+U3RyaW5nSW1wbCgpIGluIE5ldHdvcmtQcm9jZXNzOjpkZWxldGVXZWJzaXRlRGF0YUZvclJl
Z2lzdHJhYmxlRG9tYWlucygpCisgICAgICAgIGh0dHBzOi8vYnVncy53ZWJraXQub3JnL3Nob3df
YnVnLmNnaT9pZD0yMDA5ODYKKyAgICAg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