Bug 193236 - Stop using NetworkStorageSession in WebProcess
Summary: Stop using NetworkStorageSession in WebProcess
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-08 08:06 PST by Alex Christensen
Modified: 2019-01-09 16:12 PST (History)
7 users (show)

See Also:


Attachments
Patch (28.61 KB, patch)
2019-01-08 08:07 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (37.29 KB, patch)
2019-01-08 08:47 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (38.84 KB, patch)
2019-01-08 09:15 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (72.99 KB, patch)
2019-01-08 12:39 PST, Alex Christensen
don.olmstead: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2019-01-08 08:06:31 PST
Stop using NetworkStorageSession in WebProcess
Comment 1 Alex Christensen 2019-01-08 08:07:45 PST
Created attachment 358591 [details]
Patch
Comment 2 EWS Watchlist 2019-01-08 08:10:36 PST
Attachment 358591 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebView.mm:3671:  The parameter name "storageSession" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 12 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 Alex Christensen 2019-01-08 08:47:33 PST
Created attachment 358596 [details]
Patch
Comment 4 EWS Watchlist 2019-01-08 08:50:38 PST
Attachment 358596 [details] did not pass style-queue:


ERROR: Source/WebKitLegacy/mac/WebView/WebView.mm:3671:  The parameter name "storageSession" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 1 in 15 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Alex Christensen 2019-01-08 09:15:30 PST
Created attachment 358602 [details]
Patch
Comment 6 Don Olmstead 2019-01-08 09:27:00 PST
Any other ports require any work for this?
Comment 7 Alex Christensen 2019-01-08 09:27:54 PST
(In reply to Don Olmstead from comment #6)
> Any other ports require any work for this?
I believe I already did this work for them.
Comment 8 Alex Christensen 2019-01-08 10:09:10 PST
http://trac.webkit.org/r239727
Comment 9 Radar WebKit Bug Importer 2019-01-08 10:10:42 PST
<rdar://problem/47118630>
Comment 10 Alex Christensen 2019-01-08 12:13:29 PST
Rolled out in http://trac.webkit.org/r239735
Comment 11 Alex Christensen 2019-01-08 12:14:04 PST
Comment on attachment 358602 [details]
Patch

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

> Source/WebCore/loader/CookieJar.cpp:57
> -    return context ? context->storageSession() : NetworkStorageSession::defaultStorageSession();
> +    return context ? *context->storageSession() : NetworkStorageSession::defaultStorageSession();

This was causing crashes like this:

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [54915]

VM Regions Near 0:
--> 
    __TEXT                 0000000104339000-000000010433c000 [   12K] r-x/rwx SM=COW  /Users/USER/*/WebKit.framework/Versions/A/XPCServices/com.apple.WebKit.WebContent.xpc/Contents/MacOS/com.apple.WebKit.WebContent.Development

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.WebKit              	0x0000000230294cfc WebCore::NetworkStorageSession::sessionID() const + 12 (NetworkStorageSession.h:87)
1   com.apple.WebKit              	0x0000000230ee1d3b WebKit::WebPlatformStrategies::setCookiesFromDOM(WebCore::NetworkStorageSession const&, WTF::URL const&, WebCore::SameSiteInfo const&, WTF::URL const&, WTF::Optional<unsigned long long>, WTF::Optional<unsigned long long>, WTF::String const&) + 91 (WebPlatformStrategies.cpp:122)
2   com.apple.WebKit              	0x0000000230ee1f4f non-virtual thunk to WebKit::WebPlatformStrategies::setCookiesFromDOM(WebCore::NetworkStorageSession const&, WTF::URL const&, WebCore::SameSiteInfo const&, WTF::URL const&, WTF::Optional<unsigned long long>, WTF::Optional<unsigned long long>, WTF::String const&) + 95
3   com.apple.WebCore             	0x000000023a53227c WebCore::setCookies(WebCore::Document&, WTF::URL const&, WTF::String const&) + 300 (CookieJar.cpp:112)
4   com.apple.WebCore             	0x0000000239c75365 WebCore::Document::setCookie(WTF::String const&) + 405 (Document.cpp:4801)
5   com.apple.WebCore             	0x00000002382a21ce WebCore::setJSDocumentCookieSetter(JSC::ExecState&, WebCore::JSDocument&, JSC::JSValue, JSC::ThrowScope&)::'lambda'()::operator()() const + 62 (JSDocument.cpp:1357)
Comment 12 Alex Christensen 2019-01-08 12:39:29 PST
Created attachment 358623 [details]
Patch
Comment 13 Alex Christensen 2019-01-08 12:49:52 PST
http://trac.webkit.org/r239737
Comment 14 Alex Christensen 2019-01-09 16:12:40 PST
This caused https://bugs.webkit.org/show_bug.cgi?id=193307