WebKit Bugzilla
Attachment 347130 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
bug-188576-20180814164631.patch (text/plain), 9.24 KB, created by
Sihui Liu
on 2018-08-14 16:46:32 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Sihui Liu
Created:
2018-08-14 16:46:32 PDT
Size:
9.24 KB
patch
obsolete
>Subversion Revision: 234815 >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 9e3abc0e946fffc763238871f12bfa6ea0d55afa..687945825974a54e5fbe7577e304505e790dc2b9 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,16 @@ >+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 NOBODY (OOPS!). >+ >+ callbackAggregator was accessed after it is moved. >+ >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::NetworkProcess::fetchWebsiteData): >+ > 2018-08-13 Alex Christensen <achristensen@webkit.org> > > Fix linux build after r234811 >diff --git a/Source/WebKit/NetworkProcess/NetworkProcess.cpp b/Source/WebKit/NetworkProcess/NetworkProcess.cpp >index 7de800e718a61dc27f47774916b558a977c5705f..eeeaf6b57cfc166f91a378e1e5ed88a86dc95762 100644 >--- a/Source/WebKit/NetworkProcess/NetworkProcess.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkProcess.cpp >@@ -557,18 +557,18 @@ void NetworkProcess::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<Websit > }); > } > >- 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)) > 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) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 2354784ae00eee9ab9d0695cee8e227bae3f5161..d70633d7cc4af54fbefddbe76eea814203f76ccd 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,13 @@ >+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 NOBODY (OOPS!). >+ >+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: >+ > 2018-08-13 Thomas Denney <tdenney@apple.com> > > Added Thomas Denney to contributors.json. >diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >index fdf454cfd9faf6a9f8125624e51ef686a3603fa4..61a2161022edf05a03e67fee385e33e7d0717ed7 100644 >--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >@@ -596,6 +596,7 @@ > 93625D271CD9741C006DC1F1 /* large-video-without-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93625D261CD973AF006DC1F1 /* large-video-without-audio.html */; }; > 936F72801CD7D9EC0068A0FB /* large-video-with-audio.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 936F727E1CD7D9D00068A0FB /* large-video-with-audio.html */; }; > 936F72811CD7D9EC0068A0FB /* large-video-with-audio.mp4 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 936F727F1CD7D9D00068A0FB /* large-video-with-audio.mp4 */; }; >+ 9378CB3C21239DA600226ACD /* WKWebsiteDataStore.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9378CB3B21239DA600226ACD /* WKWebsiteDataStore.mm */; }; > 93AF4ECE1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 93AF4ECD1506F064007FD57E /* NewFirstVisuallyNonEmptyLayoutForImages_Bundle.cpp */; }; > 93AF4ED11506F130007FD57E /* lots-of-images.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93AF4ECF1506F123007FD57E /* lots-of-images.html */; }; > 93CFA8671CEB9E38000565A8 /* autofocused-text-input.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93CFA8661CEB9DE1000565A8 /* autofocused-text-input.html */; }; >@@ -1701,6 +1702,7 @@ > 93625D261CD973AF006DC1F1 /* large-video-without-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "large-video-without-audio.html"; sourceTree = "<group>"; }; > 936F727E1CD7D9D00068A0FB /* large-video-with-audio.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "large-video-with-audio.html"; sourceTree = "<group>"; }; > 936F727F1CD7D9D00068A0FB /* large-video-with-audio.mp4 */ = {isa = PBXFileReference; lastKnownFileType = file; path = "large-video-with-audio.mp4"; sourceTree = "<group>"; }; >+ 9378CB3B21239DA600226ACD /* WKWebsiteDataStore.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WKWebsiteDataStore.mm; sourceTree = "<group>"; }; > 939BA91614103412001A01BD /* DeviceScaleFactorOnBack.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DeviceScaleFactorOnBack.mm; sourceTree = "<group>"; }; > 939BFE3918E5548900883275 /* StringTruncator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StringTruncator.mm; sourceTree = "<group>"; }; > 93A258981F92FF15003E510C /* TextCodec.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TextCodec.cpp; sourceTree = "<group>"; }; >@@ -2410,6 +2412,7 @@ > 5E4B1D2C1D404C6100053621 /* WKScrollViewDelegate.mm */, > 51C683DD1EA134DB00650183 /* WKURLSchemeHandler-1.mm */, > 5182C22D1F2BCB410059BA7C /* WKURLSchemeHandler-leaks.mm */, >+ 9378CB3B21239DA600226ACD /* WKWebsiteDataStore.mm */, > 371195AA1FE5797700A1FB92 /* WKWebViewAlwaysShowsScroller.mm */, > 2EFF06D61D8AF34A0004BB30 /* WKWebViewCandidateTests.mm */, > 5CB3CE381FA1691700C3A2D6 /* WKWebViewConfiguration.mm */, >@@ -4050,6 +4053,7 @@ > 2E7765CF16C4D81100BA2BB1 /* mainMac.mm in Sources */, > 5797FE311EB15A6800B2F4A0 /* NavigationClientDefaultCrypto.cpp in Sources */, > 7AD3FE8E1D76131200B169A4 /* TransformationMatrix.cpp in Sources */, >+ 9378CB3C21239DA600226ACD /* WKWebsiteDataStore.mm in Sources */, > ); > runOnlyForDeploymentPostprocessing = 0; > }; >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..842270b378453633c0ebea2756a2befe0c9c1e03 >--- /dev/null >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm >@@ -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