Bug 193580

Summary: Move NetworkStorageSession ownership to NetworkProcess
Product: WebKit Reporter: Alex Christensen <achristensen>
Component: New BugsAssignee: Alex Christensen <achristensen>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, ews-watchlist, ggaren, mcatanzaro, rniwa, ross.kirsling, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from ews117 for mac-highsierra
none
Archive of layout-test-results from ews121 for ios-simulator-wk2
none
Archive of layout-test-results from ews102 for mac-highsierra
none
Patch
ews-watchlist: commit-queue-
Archive of layout-test-results from ews100 for mac-highsierra
none
patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch ggaren: review+

Description Alex Christensen 2019-01-18 10:01:36 PST
Move NetworkStorageSession ownership to NetworkProcess
Comment 1 Alex Christensen 2019-01-18 10:19:42 PST
Created attachment 359502 [details]
Patch
Comment 2 Alex Christensen 2019-01-18 12:35:14 PST
Created attachment 359524 [details]
Patch
Comment 3 EWS Watchlist 2019-01-18 12:38:45 PST
Attachment 359524 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 45 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 EWS Watchlist 2019-01-18 13:33:43 PST
Comment on attachment 359524 [details]
Patch

Attachment 359524 [details] did not pass mac-debug-ews (mac):
Output: https://webkit-queues.webkit.org/results/10800351

Number of test failures exceeded the failure limit.
Comment 5 EWS Watchlist 2019-01-18 13:33:44 PST
Created attachment 359531 [details]
Archive of layout-test-results from ews117 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 6 EWS Watchlist 2019-01-18 14:44:58 PST
Comment on attachment 359524 [details]
Patch

Attachment 359524 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: https://webkit-queues.webkit.org/results/10801086

Number of test failures exceeded the failure limit.
Comment 7 EWS Watchlist 2019-01-18 14:45:00 PST
Created attachment 359542 [details]
Archive of layout-test-results from ews121 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews121  Port: ios-simulator-wk2  Platform: Mac OS X 10.13.6
Comment 8 EWS Watchlist 2019-01-18 16:32:21 PST
Comment on attachment 359524 [details]
Patch

Attachment 359524 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10803137

Number of test failures exceeded the failure limit.
Comment 9 EWS Watchlist 2019-01-18 16:32:23 PST
Created attachment 359554 [details]
Archive of layout-test-results from ews102 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews102  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 10 Alex Christensen 2019-01-18 17:28:56 PST
Created attachment 359563 [details]
Patch
Comment 11 EWS Watchlist 2019-01-18 17:31:18 PST
Attachment 359563 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 45 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 EWS Watchlist 2019-01-18 17:59:35 PST
Comment on attachment 359563 [details]
Patch

Attachment 359563 [details] did not pass mac-ews (mac):
Output: https://webkit-queues.webkit.org/results/10804259

Number of test failures exceeded the failure limit.
Comment 13 EWS Watchlist 2019-01-18 17:59:37 PST
Created attachment 359566 [details]
Archive of layout-test-results from ews100 for mac-highsierra

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-highsierra  Platform: Mac OS X 10.13.6
Comment 14 Alex Christensen 2019-01-18 18:20:30 PST
Created attachment 359570 [details]
patch
Comment 15 EWS Watchlist 2019-01-18 18:25:33 PST
Attachment 359570 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm:100:  One line control clauses should not use braces.  [whitespace/braces] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 4 in 45 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 16 Alex Christensen 2019-01-22 10:23:01 PST
Created attachment 359748 [details]
Patch
Comment 17 EWS Watchlist 2019-01-22 10:27:20 PST
Attachment 359748 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 50 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 18 Alex Christensen 2019-01-22 11:33:51 PST
Created attachment 359755 [details]
Patch
Comment 19 EWS Watchlist 2019-01-22 11:35:20 PST
Attachment 359755 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 50 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 20 Alex Christensen 2019-01-22 11:38:08 PST
Created attachment 359756 [details]
Patch
Comment 21 EWS Watchlist 2019-01-22 11:40:56 PST
Attachment 359756 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 50 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 22 Alex Christensen 2019-01-22 11:49:16 PST
Created attachment 359757 [details]
Patch
Comment 23 EWS Watchlist 2019-01-22 11:51:25 PST
Attachment 359757 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 51 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 24 Geoffrey Garen 2019-01-22 12:00:06 PST
Comment on attachment 359757 [details]
Patch

r=me
Comment 25 Alex Christensen 2019-01-22 12:21:53 PST
Created attachment 359762 [details]
Patch
Comment 26 EWS Watchlist 2019-01-22 12:25:35 PST
Attachment 359762 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 56 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 27 Alex Christensen 2019-01-22 12:28:57 PST
Created attachment 359763 [details]
Patch
Comment 28 EWS Watchlist 2019-01-22 12:30:53 PST
Attachment 359763 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 56 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 29 Alex Christensen 2019-01-22 12:34:35 PST
Created attachment 359764 [details]
Patch
Comment 30 EWS Watchlist 2019-01-22 12:36:30 PST
Attachment 359764 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebPreferences.mm:33:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/mac/Misc/WebDownload.mm:31:  Bad include order. Mixing system and custom headers.  [build/include_order] [4]
ERROR: Source/WebKitLegacy/WebCoreSupport/NetworkStorageSessionMap.cpp:26:  Found header this file implements before WebCore config.h. Should be: config.h, primary header, blank line, and then alphabetically sorted.  [build/include_order] [4]
Total errors found: 3 in 57 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 31 Geoffrey Garen 2019-01-22 13:02:29 PST
Comment on attachment 359764 [details]
Patch

r=me
Comment 32 Alex Christensen 2019-01-22 13:28:42 PST
http://trac.webkit.org/r240292
Comment 33 Radar WebKit Bug Importer 2019-01-22 13:29:31 PST
<rdar://problem/47457742>
Comment 34 Michael Catanzaro 2019-01-22 13:43:48 PST
Alex, can you allow more time for this? I had it on my TODO for after the NetworkProcessCreationParameters work, but I can move it up if needed. Our bots don't build anymore and without a rollout we're going to lose a lot of test results until we get it sorted:

In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:2:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp: In lambda function:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:159:38: error: use of deleted function ‘WebCore::NetworkStorageSession::NetworkStorageSession(const WebCore::NetworkStorageSession&)’
         return defaultStorageSession();
                                      ^
In file included from DerivedSources/ForwardingHeaders/wtf/RefCounted.h:25,
                 from DerivedSources/ForwardingHeaders/wtf/NeverDestroyed.h:30,
                 from DerivedSources/ForwardingHeaders/wtf/ObjectIdentifier.h:31,
                 from ../../Source/WebKit/Shared/UserContentControllerIdentifier.h:28,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.h:28,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:27,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
../../Source/WebCore/platform/network/NetworkStorageSession.h:75:26: note: declared here
     WTF_MAKE_NONCOPYABLE(NetworkStorageSession); WTF_MAKE_FAST_ALLOCATED;
                          ^~~~~~~~~~~~~~~~~~~~~
DerivedSources/ForwardingHeaders/wtf/Noncopyable.h:25:9: note: in definition of macro ‘WTF_MAKE_NONCOPYABLE’
         ClassName(const ClassName&) = delete; \
         ^~~~~~~~~
In file included from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:2:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp: In member function ‘void WebKit::NetworkProcess::switchToNewTestingSession()’:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:476:37: error: ‘createPrivateStorageSession’ is not a member of ‘WebCore’
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:476:37: note: suggested alternative: ‘NetworkStorageSession’
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
                                     NetworkStorageSession
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:476:77: error: ‘class WTF::String’ has no member named ‘createCFString’
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
                                                                             ^~~~~~~~~~~~~~
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:476:20: error: ‘adoptCF’ was not declared in this scope
     auto session = adoptCF(WebCore::createPrivateStorageSession(sessionName.createCFString().get()));
                    ^~~~~~~
In file included from /usr/include/c++/8/memory:80,
                 from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:30,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25,
                 from ../../Source/WebKit/config.h:47,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:26,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = WebCore::SoupNetworkSession; _Args = {}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<WebCore::SoupNetworkSession>]’:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:488:169:   required from here
/usr/include/c++/8/bits/unique_ptr.h:831:30: error: invalid use of incomplete type ‘class WebCore::SoupNetworkSession’
     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebCore/NetworkStorageSession.h:1,
                 from ../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:71,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:2:
../../Source/WebCore/platform/network/NetworkStorageSession.h:66:7: note: forward declaration of ‘class WebCore::SoupNetworkSession’
 class SoupNetworkSession;
       ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/memory:80,
                 from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:30,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25,
                 from ../../Source/WebKit/config.h:47,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:26,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = WebCore::SoupNetworkSession; _Args = {const PAL::SessionID&}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<WebCore::SoupNetworkSession>]’:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:518:130:   required from here
/usr/include/c++/8/bits/unique_ptr.h:831:30: error: invalid use of incomplete type ‘class WebCore::SoupNetworkSession’
     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebCore/NetworkStorageSession.h:1,
                 from ../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:71,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:2:
../../Source/WebCore/platform/network/NetworkStorageSession.h:66:7: note: forward declaration of ‘class WebCore::SoupNetworkSession’
 class SoupNetworkSession;
       ^~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/8/memory:80,
                 from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:30,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25,
                 from ../../Source/WebKit/config.h:47,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:26,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = WebCore::NetworkStorageSession; _Args = {PAL::SessionID}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<WebCore::NetworkStorageSession>]’:
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:532:125:   required from here
/usr/include/c++/8/bits/unique_ptr.h:831:30: error: no matching function for call to ‘WebCore::NetworkStorageSession::NetworkStorageSession(PAL::SessionID)’
     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/WebCore/NetworkStorageSession.h:1,
                 from ../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:71,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:2:
../../Source/WebCore/platform/network/NetworkStorageSession.h:97:20: note: candidate: ‘WebCore::NetworkStorageSession::NetworkStorageSession(PAL::SessionID, std::unique_ptr<WebCore::SoupNetworkSession>&&)’
     WEBCORE_EXPORT NetworkStorageSession(PAL::SessionID, std::unique_ptr<SoupNetworkSession>&&);
                    ^~~~~~~~~~~~~~~~~~~~~
../../Source/WebCore/platform/network/NetworkStorageSession.h:97:20: note:   candidate expects 2 arguments, 1 provided
In file included from /usr/include/c++/8/memory:80,
                 from DerivedSources/ForwardingHeaders/wtf/StdLibExtras.h:30,
                 from DerivedSources/ForwardingHeaders/wtf/FastMalloc.h:25,
                 from ../../Source/WebKit/config.h:47,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:26,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
/usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = WebCore::SoupNetworkSession]’:
/usr/include/c++/8/bits/unique_ptr.h:274:17:   required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = WebCore::SoupNetworkSession; _Dp = std::default_delete<WebCore::SoupNetworkSession>]’
../../Source/WebKit/NetworkProcess/NetworkProcess.cpp:488:169:   required from here
/usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘WebCore::SoupNetworkSession’
  static_assert(sizeof(_Tp)>0,
                ^~~~~~~~~~~
In file included from DerivedSources/ForwardingHeaders/wtf/text/WTFString.h:28,
                 from DerivedSources/ForwardingHeaders/wtf/ObjectIdentifier.h:32,
                 from ../../Source/WebKit/Shared/UserContentControllerIdentifier.h:28,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.h:28,
                 from ../../Source/WebKit/NetworkProcess/NetworkLoadChecker.cpp:27,
                 from DerivedSources/WebKit/unified-sources/UnifiedSource-72468c22-2.cpp:1:
DerivedSources/ForwardingHeaders/wtf/Function.h: In instantiation of ‘Out WTF::Function<Out(In ...)>::CallableWrapper<CallableType>::call(In ...) [with CallableType = WebKit::NetworkProcess::NetworkProcess()::<lambda()>; Out = WebCore::NetworkStorageSession&; In = {}]’:
DerivedSources/ForwardingHeaders/wtf/Function.h:101:13:   required from here
DerivedSources/ForwardingHeaders/wtf/Function.h:101:77: error: cannot bind non-const lvalue reference of type ‘WebCore::NetworkStorageSession&’ to an rvalue of type ‘WebCore::NetworkStorageSession’
         Out call(In... in) final { return m_callable(std::forward<In>(in)...); }
Comment 35 Alex Christensen 2019-01-22 13:52:24 PST
http://trac.webkit.org/r240295
Comment 36 Michael Catanzaro 2019-01-22 14:05:00 PST
Committed r240296: <https://trac.webkit.org/changeset/240296>
Comment 37 Michael Catanzaro 2019-01-22 15:50:43 PST
Committed r240302: <https://trac.webkit.org/changeset/240302>
Comment 38 Michael Catanzaro 2019-01-22 15:55:32 PST
I only see one remaining error building GTK:

WebCore::NetworkStorageSession& NetworkProcess::defaultStorageSession() const
{
    if (!m_defaultNetworkStorageSession)
        m_defaultNetworkStorageSession = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID());
    return *m_defaultNetworkStorageSession;
}

That NetworkStorageSession constructor taking only a PAL::SessionID is Cocoa-specific. I'll try to fix it for soup, where it requires a std::unique_ptr<SoupNetworkSession>&&. For both curl and the generic path, it requires a NetworkingContext* parameter.
Comment 39 Michael Catanzaro 2019-01-22 16:10:24 PST
Committed r240304: <https://trac.webkit.org/changeset/240304>
Comment 40 Michael Catanzaro 2019-01-22 16:11:29 PST
libsoup build is fixed. Networking doesn't work yet.

This would have been a lot easier had you waited; it really was near the top of my TODO. :(
Comment 41 Michael Catanzaro 2019-01-22 16:15:53 PST
BTW I'm not sure if the generic NetworkStorageSession constructor is actually usable. This one:

WEBCORE_EXPORT NetworkStorageSession(PAL::SessionID, NetworkingContext*);

No ports build that code. I don't think it's usable because the only instantiable NetworkingContext seems to be CurlContext. I left an #error for that case in NetworkProcess::defaultStorageSession.
Comment 42 Michael Catanzaro 2019-01-22 16:19:18 PST
Committed r240306: <https://trac.webkit.org/changeset/240306>
Comment 43 Michael Catanzaro 2019-01-22 20:07:00 PST
Committed r240317: <https://trac.webkit.org/changeset/240317>
Comment 44 Michael Catanzaro 2019-01-22 21:14:22 PST
Comment on attachment 359764 [details]
Patch

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

> Source/WebKit/NetworkProcess/CustomProtocols/soup/LegacyCustomProtocolManagerSoup.cpp:48
> +RefPtr<NetworkProcess>& lastCreatedNetworkProcess()
> +{
> +    static NeverDestroyed<RefPtr<NetworkProcess>> networkProcess;
> +    return networkProcess.get();
> +}
> +
> +void LegacyCustomProtocolManager::networkProcessCreated(NetworkProcess& networkProcess)
> +{
> +    lastCreatedNetworkProcess() = &networkProcess;
> +}

Alex, can multiple NetworkProcess objects really exist within the same network process? Surely not?
Comment 45 David Kilzer (:ddkilzer) 2019-01-23 10:40:28 PST
Attempt WinCairo build fix:

Committed r240345: <https://trac.webkit.org/changeset/240345>
Comment 46 Ross Kirsling 2019-01-23 10:57:34 PST
(In reply to David Kilzer (:ddkilzer) from comment #45)
> Attempt WinCairo build fix:
> 
> Committed r240345: <https://trac.webkit.org/changeset/240345>

Note that StorageSessionProvider::storageSession() is pure virtual and only actually implemented for CF. That's why I had to do a partial revert of the  patch that preceded this one:

https://trac.webkit.org/changeset/240132/webkit
Comment 47 Ross Kirsling 2019-01-23 11:00:38 PST
(In reply to Ross Kirsling from comment #46)
> (In reply to David Kilzer (:ddkilzer) from comment #45)
> > Attempt WinCairo build fix:
> > 
> > Committed r240345: <https://trac.webkit.org/changeset/240345>
> 
> Note that StorageSessionProvider::storageSession() is pure virtual and only
> actually implemented for CF. That's why I had to do a partial revert of the 
> patch that preceded this one:
> 
> https://trac.webkit.org/changeset/240132/webkit

Er wait, there's also an "Empty" one though... I could be wrong, I just was unclear on another way to solve the previous problem.
Comment 48 Michael Catanzaro 2019-01-23 11:02:56 PST
I wonder what all the empty clients are actually used for.
Comment 49 David Kilzer (:ddkilzer) 2019-01-23 11:07:47 PST
(In reply to Ross Kirsling from comment #47)
> (In reply to Ross Kirsling from comment #46)
> > (In reply to David Kilzer (:ddkilzer) from comment #45)
> > > Attempt WinCairo build fix:
> > > 
> > > Committed r240345: <https://trac.webkit.org/changeset/240345>
> > 
> > Note that StorageSessionProvider::storageSession() is pure virtual and only
> > actually implemented for CF. That's why I had to do a partial revert of the 
> > patch that preceded this one:
> > 
> > https://trac.webkit.org/changeset/240132/webkit
> 
> Er wait, there's also an "Empty" one though... I could be wrong, I just was
> unclear on another way to solve the previous problem.

WinCairo is failing to build this file now (so seems to have gotten past the WebCore build failure):

Source\WebKitLegacy\WebCoreSupport\NetworkStorageSessionMap.cpp

<https://build.webkit.org/builders/WinCairo%2064-bit%20WKL%20Release%20%28Build%29/builds/6348/steps/compile-webkit/logs/stdio>
Comment 50 Ross Kirsling 2019-01-23 19:39:02 PST
Restored WinCairo build in https://trac.webkit.org/changeset/240403/webkit.

Tests crash as feared so I guess that'll need be handled subsequently...
Comment 51 Alex Christensen 2019-01-24 12:45:30 PST
(In reply to Michael Catanzaro from comment #44)
> Alex, can multiple NetworkProcess objects really exist within the same
> network process? Surely not?
They will soon.  I'm going to rename WebKit::NetworkProcess accordingly.