WebKit Bugzilla
Attachment 347134 Details for
Bug 188576
: Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch (text/plain), 9.33 KB, created by
Alex Christensen
on 2018-08-14 17:16:03 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-08-14 17:16:03 PDT
Size:
9.33 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 234872) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,14 @@ >+2018-08-14 Sihui Liu <sihui_liu@apple.com> >+ >+ Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache >+ https://bugs.webkit.org/show_bug.cgi?id=188576 >+ <rdar://problem/43148977> >+ >+ Reviewed by Alex Christensen. >+ >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::NetworkProcess::fetchWebsiteData): >+ > 2018-08-14 Ansh Shukla <ansh_shukla@apple.com> > > NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault >Index: Source/WebKit/NetworkProcess/NetworkProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.cpp (revision 234851) >+++ Source/WebKit/NetworkProcess/NetworkProcess.cpp (working copy) >@@ -557,12 +557,6 @@ > }); > } > >- if (websiteDataTypes.contains(WebsiteDataType::DiskCache)) { >- fetchDiskCacheEntries(sessionID, fetchOptions, [callbackAggregator = WTFMove(callbackAggregator)](auto entries) mutable { >- callbackAggregator->m_websiteData.entries.appendVector(entries); >- }); >- } >- > #if PLATFORM(COCOA) > if (websiteDataTypes.contains(WebsiteDataType::HSTSCache)) { > if (auto* networkStorageSession = NetworkStorageSession::storageSession(sessionID)) >@@ -569,6 +563,12 @@ > getHostNamesWithHSTSCache(*networkStorageSession, callbackAggregator->m_websiteData.hostNamesWithHSTSCache); > } > #endif >+ >+ if (websiteDataTypes.contains(WebsiteDataType::DiskCache)) { >+ fetchDiskCacheEntries(sessionID, fetchOptions, [callbackAggregator = WTFMove(callbackAggregator)](auto entries) mutable { >+ callbackAggregator->m_websiteData.entries.appendVector(entries); >+ }); >+ } > } > > void NetworkProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WallTime modifiedSince, uint64_t callbackID) >Index: Tools/ChangeLog >=================================================================== >--- Tools/ChangeLog (revision 234871) >+++ Tools/ChangeLog (working copy) >@@ -1,3 +1,15 @@ >+2018-08-14 Sihui Liu <sihui_liu@apple.com> >+ >+ Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache >+ https://bugs.webkit.org/show_bug.cgi?id=188576 >+ <rdar://problem/43148977> >+ >+ Reviewed by Alex Christensen. >+ >+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: >+ * TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added. >+ (TEST): >+ > 2018-08-14 Ansh Shukla <ansh_shukla@apple.com> > > NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault >Index: Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >=================================================================== >--- Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (revision 234851) >+++ Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (working copy) >@@ -271,6 +271,7 @@ > 5C4A84951F7EEFFC00ACFC54 /* Configuration.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C4A84941F7EEFD400ACFC54 /* Configuration.mm */; }; > 5C69BDD51F82A7EF000F4F4B /* JavaScriptDuringNavigation.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C69BDD41F82A7EB000F4F4B /* JavaScriptDuringNavigation.mm */; }; > 5C6E65441D5CEFD400F7862E /* URLParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C6E65411D5CEF8500F7862E /* URLParser.cpp */; }; >+ 5C7148952123A40A00FDE3C5 /* WKWebsiteDatastore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7148942123A40700FDE3C5 /* WKWebsiteDatastore.mm */; }; > 5C726D6F1D3EE06E00C5E1A1 /* InstanceMethodSwizzler.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */; }; > 5C7964101EB0278D0075D74C /* EventModifiers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */; }; > 5C7C74CB1FB529BA002F9ABE /* WebViewScheduleInRunLoop.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5C7C74CA1FB528D4002F9ABE /* WebViewScheduleInRunLoop.mm */; }; >@@ -1556,6 +1557,7 @@ > 5C5E633D1D0B67940085A025 /* UniqueRef.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UniqueRef.cpp; sourceTree = "<group>"; }; > 5C69BDD41F82A7EB000F4F4B /* JavaScriptDuringNavigation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = JavaScriptDuringNavigation.mm; sourceTree = "<group>"; }; > 5C6E65411D5CEF8500F7862E /* URLParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = URLParser.cpp; sourceTree = "<group>"; }; >+ 5C7148942123A40700FDE3C5 /* WKWebsiteDatastore.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDatastore.mm; sourceTree = "<group>"; }; > 5C726D6D1D3EE06800C5E1A1 /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstanceMethodSwizzler.h; path = cocoa/InstanceMethodSwizzler.h; sourceTree = "<group>"; }; > 5C726D6E1D3EE06800C5E1A1 /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InstanceMethodSwizzler.mm; path = cocoa/InstanceMethodSwizzler.mm; sourceTree = "<group>"; }; > 5C79640F1EB0269B0075D74C /* EventModifiers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventModifiers.cpp; sourceTree = "<group>"; }; >@@ -2419,6 +2421,7 @@ > 5E4B1D2C1D404C6100053621 /* WKScrollViewDelegate.mm */, > 51C683DD1EA134DB00650183 /* WKURLSchemeHandler-1.mm */, > 5182C22D1F2BCB410059BA7C /* WKURLSchemeHandler-leaks.mm */, >+ 5C7148942123A40700FDE3C5 /* WKWebsiteDatastore.mm */, > 371195AA1FE5797700A1FB92 /* WKWebViewAlwaysShowsScroller.mm */, > 2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */, > 5CB3CE381FA1691700C3A2D6 /* WKWebViewConfiguration.mm */, >@@ -4038,6 +4041,7 @@ > 2D4CF8BD1D8360CC0001CE8D /* WKThumbnailView.mm in Sources */, > 51C683DE1EA134E800650183 /* WKURLSchemeHandler-1.mm in Sources */, > 5182C22E1F2BCE540059BA7C /* WKURLSchemeHandler-leaks.mm in Sources */, >+ 5C7148952123A40A00FDE3C5 /* WKWebsiteDatastore.mm in Sources */, > 371195AB1FE5797700A1FB92 /* WKWebViewAlwaysShowsScroller.mm in Sources */, > 514958BE1F7427AC00E87BAD /* WKWebViewAutofillTests.mm in Sources */, > 2EFF06D71D8AF34A0004BB30 /* WKWebViewCandidateTests.mm in Sources */, >Index: Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm >=================================================================== >--- Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (nonexistent) >+++ Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm (working copy) >@@ -0,0 +1,57 @@ >+/* >+ * Copyright (C) 2018 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+ >+#import "PlatformUtilities.h" >+#import "Test.h" >+#import <WebKit/WKWebsiteDataStorePrivate.h> >+#import <WebKit/WebKit.h> >+#import <wtf/text/WTFString.h> >+ >+#if WK_API_ENABLED >+ >+static bool readyToContinue; >+ >+TEST(WKWebsiteDataStore, RemoveAndFetchData) >+{ >+ readyToContinue = false; >+ [[WKWebsiteDataStore defaultDataStore] removeDataOfTypes:[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate] modifiedSince:[NSDate distantPast] completionHandler:^() { >+ readyToContinue = true; >+ }]; >+ TestWebKitAPI::Util::run(&readyToContinue); >+ >+ readyToContinue = false; >+ [[WKWebsiteDataStore defaultDataStore] fetchDataRecordsOfTypes:[WKWebsiteDataStore _allWebsiteDataTypesIncludingPrivate] completionHandler:^(NSArray<WKWebsiteDataRecord *> *dataRecords) { >+ ASSERT_EQ(0u, dataRecords.count); >+ readyToContinue = true; >+ }]; >+ TestWebKitAPI::Util::run(&readyToContinue); >+} >+ >+#endif >+ >+ >+
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188576
:
347107
|
347130
| 347134