Bug 183969 - Use SecurityOriginData more consistently in Service Worker code
Summary: Use SecurityOriginData more consistently in Service Worker code
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Service Workers (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on: 184000
Blocks:
  Show dependency treegraph
 
Reported: 2018-03-23 19:53 PDT by Chris Dumez
Modified: 2018-03-26 14:48 PDT (History)
7 users (show)

See Also:


Attachments
Patch (53.36 KB, patch)
2018-03-23 20:33 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (124.99 KB, patch)
2018-03-23 21:37 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (127.28 KB, patch)
2018-03-23 21:49 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.37 KB, patch)
2018-03-23 21:53 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.38 KB, patch)
2018-03-23 21:57 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.38 KB, patch)
2018-03-23 22:54 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.38 KB, patch)
2018-03-24 10:28 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.52 KB, patch)
2018-03-24 12:14 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.52 KB, patch)
2018-03-24 12:17 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (129.88 KB, patch)
2018-03-26 10:26 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2018-03-23 19:53:01 PDT
Use SecurityOriginData more consistently in Service Worker code to avoid constructing SecurityOrigin objects.
Comment 1 Chris Dumez 2018-03-23 20:33:38 PDT
Created attachment 336454 [details]
Patch
Comment 2 EWS Watchlist 2018-03-23 20:34:31 PDT
Attachment 336454 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 26 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Darin Adler 2018-03-23 20:53:17 PDT
Comment on attachment 336454 [details]
Patch

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

> Source/WebCore/ChangeLog:17
> +        * page/SecurityOriginData.cpp:
> +        (WebCore::SecurityOriginData::toString const):
> +        Update the SecurityOriginData::toString() implementation to match the one in
> +        SecurityOrigin. In particular, in the common case where there is no port, the
> +        string is now https://www.webkit.org, not https://www.webkit.org:0.

This comment is slightly misleading. The function does *not* match SecurityOrigin::toRawString in the case where m_protocol is "file".

> Source/WebCore/page/SecurityOriginData.cpp:64
> -    return makeString(protocol, "://", host, ":", String::number(port.value_or(0)));
> +    StringBuilder result;
> +    result.reserveCapacity(protocol.length() + host.length() + 10);
> +    result.append(protocol);
> +    result.appendLiteral("://");
> +    result.append(host);
> +
> +    if (port) {
> +        result.append(':');
> +        result.appendNumber(port.value());
> +    }
> +
> +    return result.toString();

Here’s another way to write it that is simpler and more efficient:

    if (!port)
        return makeString(protocol, "://", host);
    return makeString(protocol, "://", host, ':', *port);

We should change SecurityOrigin::toRawString to do it that way, I think. Should we eventually make SecurityOrigin use a SecurityOriginData data member instead of m_protocol, m_host, and m_port? If so, then SecurityOrigin::toRawString could actually call this function.

> Source/WebCore/page/SecurityOriginData.h:29
> +#include "URL.h"
>  #include <wtf/text/WTFString.h>

Can delete the include of WTFString.h since we are adding the include of URL.h.

> Source/WebCore/workers/service/server/SWOriginStore.h:30
> +#include "SecurityOriginData.h"

Can remove the include of WTFString.h since we are adding the include of SecurityOriginData.h.

> Source/WebCore/workers/service/server/SWOriginStore.h:32
>  #include <wtf/text/StringHash.h>

We can remove this include too since we aren’t hashing strings here any more.
Comment 4 Chris Dumez 2018-03-23 21:37:03 PDT
Created attachment 336455 [details]
Patch
Comment 5 EWS Watchlist 2018-03-23 21:38:50 PDT
Attachment 336455 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 74 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 6 Chris Dumez 2018-03-23 21:49:30 PDT
Created attachment 336456 [details]
Patch
Comment 7 EWS Watchlist 2018-03-23 21:52:10 PDT
Attachment 336456 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 77 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Chris Dumez 2018-03-23 21:53:17 PDT
Created attachment 336457 [details]
Patch
Comment 9 EWS Watchlist 2018-03-23 21:55:32 PDT
Attachment 336457 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Chris Dumez 2018-03-23 21:57:54 PDT
Created attachment 336458 [details]
Patch
Comment 11 Chris Dumez 2018-03-23 21:59:10 PDT
Darin, I made the refactoring you suggested. Could you please take another look?

Also note that makeString() does not do the right thing when passed a uint16_t so I had to call String::number() first.
Comment 12 EWS Watchlist 2018-03-23 22:00:51 PDT
Attachment 336458 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 13 Chris Dumez 2018-03-23 22:54:08 PDT
Created attachment 336464 [details]
Patch
Comment 14 EWS Watchlist 2018-03-23 22:56:26 PDT
Attachment 336464 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 15 Chris Dumez 2018-03-24 10:28:23 PDT
Created attachment 336475 [details]
Patch
Comment 16 EWS Watchlist 2018-03-24 10:29:45 PDT
Attachment 336475 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 Darin Adler 2018-03-24 11:51:18 PDT
Comment on attachment 336475 [details]
Patch

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

> Source/WebCore/page/SecurityOriginData.cpp:47
> +    return makeString(protocol, "://", host, ':', String::number(*port));

Calling String::number should not be necessary if we include the StringConcatenateNumbers.h header, and that would save allocating and then destroying a String every time.
Comment 18 Chris Dumez 2018-03-24 12:06:27 PDT
(In reply to Darin Adler from comment #17)
> Comment on attachment 336475 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=336475&action=review
> 
> > Source/WebCore/page/SecurityOriginData.cpp:47
> > +    return makeString(protocol, "://", host, ':', String::number(*port));
> 
> Calling String::number should not be necessary if we include the
> StringConcatenateNumbers.h header, and that would save allocating and then
> destroying a String every time.

#include <wtf/text/StringConcatenateNumbers.h> does not seem to help:
--- /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/layout-test-results/http/tests/cache-storage/cache-clearing-origin.https-expected.txt
+++ /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/layout-test-results/http/tests/cache-storage/cache-clearing-origin.https-actual.txt
@@ -1,7 +1,7 @@
 
 
 PASS Create a cache storage from localhost and clear it 
-PASS Clearing disk cache of a given origin 
-PASS Validating cache representation before clearing 
-PASS Validating cache representation after clearing 
+FAIL Clearing disk cache of a given origin assert_true: Actual origin cache size is not zero expected true got false
+FAIL Validating cache representation before clearing assert_equals: top origin of cache 1 expected "https://127.0.0.1:8443" but got "https://127.0.0.1:⃻"
+FAIL Validating cache representation after clearing assert_equals: top origin of cache 1 expected "https://127.0.0.1:8443" but got "https://127.0.0.1:⃻"
Comment 19 Chris Dumez 2018-03-24 12:11:32 PDT
(In reply to Chris Dumez from comment #18)
> (In reply to Darin Adler from comment #17)
> > Comment on attachment 336475 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=336475&action=review
> > 
> > > Source/WebCore/page/SecurityOriginData.cpp:47
> > > +    return makeString(protocol, "://", host, ':', String::number(*port));
> > 
> > Calling String::number should not be necessary if we include the
> > StringConcatenateNumbers.h header, and that would save allocating and then
> > destroying a String every time.
> 
> #include <wtf/text/StringConcatenateNumbers.h> does not seem to help:
> ---
> /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/layout-test-results/http/
> tests/cache-storage/cache-clearing-origin.https-expected.txt
> +++
> /Volumes/Data/WebKit/OpenSource/WebKitBuild/Release/layout-test-results/http/
> tests/cache-storage/cache-clearing-origin.https-actual.txt
> @@ -1,7 +1,7 @@
>  
>  
>  PASS Create a cache storage from localhost and clear it 
> -PASS Clearing disk cache of a given origin 
> -PASS Validating cache representation before clearing 
> -PASS Validating cache representation after clearing 
> +FAIL Clearing disk cache of a given origin assert_true: Actual origin cache
> size is not zero expected true got false
> +FAIL Validating cache representation before clearing assert_equals: top
> origin of cache 1 expected "https://127.0.0.1:8443" but got
> "https://127.0.0.1:⃻"
> +FAIL Validating cache representation after clearing assert_equals: top
> origin of cache 1 expected "https://127.0.0.1:8443" but got
> "https://127.0.0.1:⃻"

My best is that it probably ends up using the template specialization for UChar?
Comment 20 Darin Adler 2018-03-24 12:12:50 PDT
(In reply to Chris Dumez from comment #18)
> (In reply to Darin Adler from comment #17)
> > Comment on attachment 336475 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=336475&action=review
> > 
> > > Source/WebCore/page/SecurityOriginData.cpp:47
> > > +    return makeString(protocol, "://", host, ':', String::number(*port));
> > 
> > Calling String::number should not be necessary if we include the
> > StringConcatenateNumbers.h header, and that would save allocating and then
> > destroying a String every time.
> 
> #include <wtf/text/StringConcatenateNumbers.h> does not seem to help:

The problem is that UChar and uint16_t are the same type, so it’s interpreting the port number as a character. A short term workaround is to convert the port number to some other integer type:

    static_cast<uint32_t>(*port)

A longer term solution would be to make an adapter to resolve the ambiguity, something like how FormattedNumber works, or even just add integer serializing to FormattedNumber itself.
Comment 21 Chris Dumez 2018-03-24 12:14:33 PDT
Created attachment 336480 [details]
Patch
Comment 22 Chris Dumez 2018-03-24 12:15:22 PDT
Comment on attachment 336480 [details]
Patch

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

> Source/WebCore/page/SecurityOriginData.cpp:48
> +    return makeString(protocol, "://", host, ':', static_cast<unsigned>(*port));

Using static_cast<unsigned>(), I can force it to use the right template specialization and it works without doing a String allocation.
Comment 23 Chris Dumez 2018-03-24 12:16:18 PDT
(In reply to Chris Dumez from comment #22)
> Comment on attachment 336480 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=336480&action=review
> 
> > Source/WebCore/page/SecurityOriginData.cpp:48
> > +    return makeString(protocol, "://", host, ':', static_cast<unsigned>(*port));
> 
> Using static_cast<unsigned>(), I can force it to use the right template
> specialization and it works without doing a String allocation.

Oh, I just saw your comment. I'll use uint32_t as you suggested.
Comment 24 Chris Dumez 2018-03-24 12:17:03 PDT
Created attachment 336481 [details]
Patch
Comment 25 EWS Watchlist 2018-03-24 12:18:12 PDT
Attachment 336481 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 26 WebKit Commit Bot 2018-03-24 12:54:48 PDT
Comment on attachment 336481 [details]
Patch

Clearing flags on attachment: 336481

Committed r229954: <https://trac.webkit.org/changeset/229954>
Comment 27 WebKit Commit Bot 2018-03-24 12:54:49 PDT
All reviewed patches have been landed.  Closing bug.
Comment 28 Radar WebKit Bug Importer 2018-03-24 12:55:17 PDT
<rdar://problem/38831027>
Comment 29 Daniel Bates 2018-03-25 21:56:15 PDT
(In reply to WebKit Commit Bot from comment #26)
> Comment on attachment 336481 [details]
> Patch
> 
> Clearing flags on attachment: 336481
> 
> Committed r229954: <https://trac.webkit.org/changeset/229954>

This caused many layout tests to crash on the Apple High Sierra Debug, Apple Sierra Debug, Apple iOS 11 Simulator Debug and GTK Linux 64-bit Debug test bots. For convenience, the following are hyperlinks to the test results:

Apple Sierra Debug WK1 (Tests):
<https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK1%20(Tests)/r229954%20(6875)/results.html>
<https://build.webkit.org/builders/Apple%20Sierra%20Debug%20WK1%20%28Tests%29/builds/6875>

Apple Sierra Debug WK2 (Tests):
<https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/r229954%20(5768)/results.html>
<https://build.webkit.org/builders/Apple%20Sierra%20Debug%20WK2%20%28Tests%29/builds/5768>

Apple High Sierra Debug WK1 (Tests):
<https://build.webkit.org/results/Apple%20High%20Sierra%20Debug%20WK1%20(Tests)/r229954%20(2992)/results.html>
<https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20WK1%20%28Tests%29/builds/2992>

Apple High Sierra Debug WK2 (Tests):
<https://build.webkit.org/results/Apple%20High%20Sierra%20Debug%20WK2%20(Tests)/r229954%20(2579)/results.html>
<https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20WK2%20%28Tests%29/builds/2579>

Apple iOS 11 Simulator Debug WK2 (Tests):
<https://build.webkit.org/results/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r229954%20(3375)/results.html>
<https://build.webkit.org/builders/Apple%20iOS%2011%20Simulator%20Debug%20WK2%20%28Tests%29/builds/3375>

GTK Linux 64-bit Debug (Tests):
<https://build.webkit.org/results/GTK%20Linux%2064-bit%20Debug%20(Tests)/r229956%20(2747)/results.html>
<https://build.webkit.org/builders/GTK%20Linux%2064-bit%20Debug%20%28Tests%29/builds/2747>
Comment 30 WebKit Commit Bot 2018-03-25 21:57:19 PDT
Re-opened since this is blocked by bug 184000
Comment 31 Chris Dumez 2018-03-26 08:56:06 PDT
(In reply to Daniel Bates from comment #29)
> (In reply to WebKit Commit Bot from comment #26)
> > Comment on attachment 336481 [details]
> > Patch
> > 
> > Clearing flags on attachment: 336481
> > 
> > Committed r229954: <https://trac.webkit.org/changeset/229954>
> 
> This caused many layout tests to crash on the Apple High Sierra Debug, Apple
> Sierra Debug, Apple iOS 11 Simulator Debug and GTK Linux 64-bit Debug test
> bots. For convenience, the following are hyperlinks to the test results:
> 
> Apple Sierra Debug WK1 (Tests):
> <https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK1%20(Tests)/
> r229954%20(6875)/results.html>
> <https://build.webkit.org/builders/
> Apple%20Sierra%20Debug%20WK1%20%28Tests%29/builds/6875>
> 
> Apple Sierra Debug WK2 (Tests):
> <https://build.webkit.org/results/Apple%20Sierra%20Debug%20WK2%20(Tests)/
> r229954%20(5768)/results.html>
> <https://build.webkit.org/builders/
> Apple%20Sierra%20Debug%20WK2%20%28Tests%29/builds/5768>
> 
> Apple High Sierra Debug WK1 (Tests):
> <https://build.webkit.org/results/
> Apple%20High%20Sierra%20Debug%20WK1%20(Tests)/r229954%20(2992)/results.html>
> <https://build.webkit.org/builders/
> Apple%20High%20Sierra%20Debug%20WK1%20%28Tests%29/builds/2992>
> 
> Apple High Sierra Debug WK2 (Tests):
> <https://build.webkit.org/results/
> Apple%20High%20Sierra%20Debug%20WK2%20(Tests)/r229954%20(2579)/results.html>
> <https://build.webkit.org/builders/
> Apple%20High%20Sierra%20Debug%20WK2%20%28Tests%29/builds/2579>
> 
> Apple iOS 11 Simulator Debug WK2 (Tests):
> <https://build.webkit.org/results/
> Apple%20iOS%2011%20Simulator%20Debug%20WK2%20(Tests)/r229954%20(3375)/
> results.html>
> <https://build.webkit.org/builders/
> Apple%20iOS%2011%20Simulator%20Debug%20WK2%20%28Tests%29/builds/3375>
> 
> GTK Linux 64-bit Debug (Tests):
> <https://build.webkit.org/results/GTK%20Linux%2064-bit%20Debug%20(Tests)/
> r229956%20(2747)/results.html>
> <https://build.webkit.org/builders/GTK%20Linux%2064-
> bit%20Debug%20%28Tests%29/builds/2747>

I am looking into this, thanks.
Comment 32 Chris Dumez 2018-03-26 09:02:23 PDT
Assertion hit in debug WK2, which is why EWS did not catch it:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.JavaScriptCore      	0x0000000124dda694 WTFCrash + 36 (Assertions.cpp:271)
1   com.apple.WebKit              	0x000000011156ba66 WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >::leakRef() + 70 (Ref.h:133)
2   com.apple.WebKit              	0x000000011156b9d1 WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >::Ref(WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 33 (Ref.h:75)
3   com.apple.WebKit              	0x000000011156b99d WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >::Ref(WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 29 (Ref.h:78)
4   com.apple.WebKit              	0x000000011156b96c WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >(WebCore::SecurityOriginData&&, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 76 (KeyValuePair.h:46)
5   com.apple.WebKit              	0x000000011156b8a5 WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >(WebCore::SecurityOriginData&&, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 37 (KeyValuePair.h:46)
6   com.apple.WebKit              	0x000000011156b839 WTF::KeyValuePairHashTraits<WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::emptyValue() + 57 (HashTraits.h:292)
7   com.apple.WebKit              	0x000000011156b7f9 void WTF::HashTableBucketInitializer<false>::initialize<WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >(WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >&) + 57 (HashTable.h:841)
8   com.apple.WebKit              	0x000000011156b7b5 WTF::HashTable<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> >::initializeBucket(WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >&) + 21 (HashTable.h:858)
9   com.apple.WebKit              	0x000000011156b5db WTF::HashTable<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> >::allocateTable(unsigned int) + 75 (HashTable.h:1148)
10  com.apple.WebKit              	0x000000011156b368 WTF::HashTable<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> >::rehash(unsigned int, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >*) + 72 (HashTable.h:1197)
11  com.apple.WebKit              	0x0000000111573005 WTF::HashTable<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> >::expand(WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >*) + 117 (HashTable.h:1174)
12  com.apple.WebKit              	0x0000000111572d1c WTF::HashTableAddResult<WTF::HashTableIterator<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> > > WTF::HashTable<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> >::add<WTF::HashMapTranslator<WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WebCore::SecurityOriginDataHash>, WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >(WebCore::SecurityOriginData&&, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 108 (HashTable.h:869)
13  com.apple.WebKit              	0x0000000111572c9c WTF::HashTableAddResult<WTF::HashTableIterator<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> > > WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::inlineAdd<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >(WebCore::SecurityOriginData&&, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 60 (HashMap.h:346)
14  com.apple.WebKit              	0x0000000111560b7f WTF::HashTableAddResult<WTF::HashTableIterator<WebCore::SecurityOriginData, WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >, WTF::KeyValuePairKeyExtractor<WTF::KeyValuePair<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >, WebCore::SecurityOriginDataHash, WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::KeyValuePairTraits, WTF::HashTraits<WebCore::SecurityOriginData> > > WTF::HashMap<WebCore::SecurityOriginData, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >, WebCore::SecurityOriginDataHash, WTF::HashTraits<WebCore::SecurityOriginData>, WTF::HashTraits<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > > >::add<WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> > >(WebCore::SecurityOriginData&&, WTF::Ref<WebKit::WebSWServerToContextConnection, WTF::DumbPtrTraits<WebKit::WebSWServerToContextConnection> >&&) + 79 (HashMap.h:388)
15  com.apple.WebKit              	0x0000000111560247 WebKit::StorageProcess::createStorageToWebProcessConnection(bool, WebCore::SecurityOriginData&&) + 663 (StorageProcess.cpp:279)
16  com.apple.WebKit              	0x0000000111584f68 void IPC::callMemberFunctionImpl<WebKit::StorageProcess, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&), std::__1::tuple<bool, WebCore::SecurityOriginData>, 0ul, 1ul>(WebKit::StorageProcess*, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&), std::__1::tuple<bool, WebCore::SecurityOriginData>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>) + 200 (HandleMessage.h:41)
17  com.apple.WebKit              	0x0000000111584ce0 void IPC::callMemberFunction<WebKit::StorageProcess, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&), std::__1::tuple<bool, WebCore::SecurityOriginData>, std::__1::integer_sequence<unsigned long, 0ul, 1ul> >(std::__1::tuple<bool, WebCore::SecurityOriginData>&&, WebKit::StorageProcess*, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&)) + 96 (HandleMessage.h:47)
18  com.apple.WebKit              	0x0000000111583058 void IPC::handleMessage<Messages::StorageProcess::CreateStorageToWebProcessConnection, WebKit::StorageProcess, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&)>(IPC::Decoder&, WebKit::StorageProcess*, void (WebKit::StorageProcess::*)(bool, WebCore::SecurityOriginData&&)) + 312 (HandleMessage.h:127)
Comment 33 Chris Dumez 2018-03-26 10:26:18 PDT
Created attachment 336524 [details]
Patch
Comment 34 EWS Watchlist 2018-03-26 10:27:41 PDT
Attachment 336524 [details] did not pass style-queue:


ERROR: Source/WebKit/UIProcess/ServiceWorkerProcessProxy.cpp:54:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 79 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 35 WebKit Commit Bot 2018-03-26 11:03:46 PDT
Comment on attachment 336524 [details]
Patch

Clearing flags on attachment: 336524

Committed r229979: <https://trac.webkit.org/changeset/229979>
Comment 36 WebKit Commit Bot 2018-03-26 11:03:47 PDT
All reviewed patches have been landed.  Closing bug.