Diff
Modified: trunk/Source/WebCore/ChangeLog (219528 => 219529)
--- trunk/Source/WebCore/ChangeLog 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebCore/ChangeLog 2017-07-14 22:51:36 UTC (rev 219529)
@@ -1,3 +1,16 @@
+2017-07-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r219516.
+
+ This caused an API failure on macOS.
+
+ Reverted changeset:
+
+ "Make sure all CFHTTPCookieStorageRefs we create are
+ scheduled."
+ https://bugs.webkit.org/show_bug.cgi?id=174513
+ http://trac.webkit.org/changeset/219516
+
2017-07-14 Jer Noble <[email protected]>
Allow clients to override their own hardware media requirements where no fallback media exists.
Modified: trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h (219528 => 219529)
--- trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebCore/platform/spi/cf/CFNetworkSPI.h 2017-07-14 22:51:36 UTC (rev 219529)
@@ -195,11 +195,10 @@
CFHTTPCookieStorageRef _CFHTTPCookieStorageGetDefault(CFAllocatorRef);
CFHTTPCookieStorageRef CFHTTPCookieStorageCreateFromFile(CFAllocatorRef, CFURLRef, CFHTTPCookieStorageRef);
-void CFHTTPCookieStorageScheduleWithRunLoop(CFHTTPCookieStorageRef, CFRunLoopRef, CFStringRef);
+
void CFHTTPCookieStorageSetCookie(CFHTTPCookieStorageRef, CFHTTPCookieRef);
void CFHTTPCookieStorageSetCookieAcceptPolicy(CFHTTPCookieStorageRef, CFHTTPCookieStorageAcceptPolicy);
CFHTTPCookieStorageAcceptPolicy CFHTTPCookieStorageGetCookieAcceptPolicy(CFHTTPCookieStorageRef);
-
void _CFNetworkSetOverrideSystemProxySettings(CFDictionaryRef);
CFURLCredentialStorageRef CFURLCredentialStorageCreate(CFAllocatorRef);
CFURLCredentialRef CFURLCredentialStorageCopyDefaultCredentialForProtectionSpace(CFURLCredentialStorageRef, CFURLProtectionSpaceRef);
Modified: trunk/Source/WebKit/ChangeLog (219528 => 219529)
--- trunk/Source/WebKit/ChangeLog 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/ChangeLog 2017-07-14 22:51:36 UTC (rev 219529)
@@ -1,3 +1,16 @@
+2017-07-14 Matt Lewis <[email protected]>
+
+ Unreviewed, rolling out r219516.
+
+ This caused an API failure on macOS.
+
+ Reverted changeset:
+
+ "Make sure all CFHTTPCookieStorageRefs we create are
+ scheduled."
+ https://bugs.webkit.org/show_bug.cgi?id=174513
+ http://trac.webkit.org/changeset/219516
+
2017-07-14 Daniel Bates <[email protected]>
REGRESSION (r219013): Compute source frame info for frameless document
Modified: trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm (219528 => 219529)
--- trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/NetworkProcess/mac/RemoteNetworkingContext.mm 2017-07-14 22:51:36 UTC (rev 219529)
@@ -26,7 +26,6 @@
#import "config.h"
#import "RemoteNetworkingContext.h"
-#import "CookieStorageUtilsCF.h"
#import "LegacyCustomProtocolManager.h"
#import "NetworkProcess.h"
#import "NetworkSession.h"
@@ -120,8 +119,10 @@
SandboxExtension::consumePermanently(parameters.cookieStoragePathExtensionHandle);
RetainPtr<CFHTTPCookieStorageRef> uiProcessCookieStorage;
- if (!parameters.uiProcessCookieStorageIdentifier.isEmpty())
- uiProcessCookieStorage = cookieStorageFromIdentifyingData(parameters.uiProcessCookieStorageIdentifier);
+ if (!parameters.uiProcessCookieStorageIdentifier.isEmpty()) {
+ RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFDataCreate(kCFAllocatorDefault, parameters.uiProcessCookieStorageIdentifier.data(), parameters.uiProcessCookieStorageIdentifier.size()));
+ uiProcessCookieStorage = adoptCF(CFHTTPCookieStorageCreateFromIdentifyingData(kCFAllocatorDefault, cookieStorageData.get()));
+ }
NetworkStorageSession::ensureSession(parameters.sessionID, base + '.' + String::number(parameters.sessionID.sessionID()), WTFMove(uiProcessCookieStorage));
Deleted: trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.cpp (219528 => 219529)
--- trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.cpp 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.cpp 2017-07-14 22:51:36 UTC (rev 219529)
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#include "config.h"
-#include "CookieStorageUtilsCF.h"
-
-namespace WebKit {
-
-RetainPtr<CFHTTPCookieStorageRef> cookieStorageFromIdentifyingData(const Vector<uint8_t>& data)
-{
- ASSERT(!data.isEmpty());
-
- auto cookieStorageData = adoptCF(CFDataCreate(kCFAllocatorDefault, data.data(), data.size()));
- auto cookieStorage = adoptCF(CFHTTPCookieStorageCreateFromIdentifyingData(kCFAllocatorDefault, cookieStorageData.get()));
- ASSERT(cookieStorage);
-
- CFHTTPCookieStorageScheduleWithRunLoop(cookieStorage.get(), CFRunLoopGetMain(), kCFRunLoopCommonModes);
-
- return cookieStorage;
-}
-
-Vector<uint8_t> identifyingDataFromCookieStorage(CFHTTPCookieStorageRef cookieStorage)
-{
- Vector<uint8_t> result;
-
- auto cfData = adoptCF(CFHTTPCookieStorageCreateIdentifyingData(kCFAllocatorDefault, cookieStorage));
- result.append(CFDataGetBytePtr(cfData.get()), CFDataGetLength(cfData.get()));
-
- return result;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.h (219528 => 219529)
--- trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.h 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/Shared/cf/CookieStorageUtilsCF.h 2017-07-14 22:51:36 UTC (rev 219529)
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#pragma once
-
-#include <WebCore/CFNetworkSPI.h>
-#include <wtf/RetainPtr.h>
-#include <wtf/Vector.h>
-
-namespace WebKit {
-
-RetainPtr<CFHTTPCookieStorageRef> cookieStorageFromIdentifyingData(const Vector<uint8_t>&);
-Vector<uint8_t> identifyingDataFromCookieStorage(CFHTTPCookieStorageRef);
-
-} // namespace WebKit
Modified: trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm (219528 => 219529)
--- trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/Shared/mac/ChildProcessMac.mm 2017-07-14 22:51:36 UTC (rev 219529)
@@ -29,7 +29,6 @@
#import "ChildProcess.h"
#import "CodeSigning.h"
-#import "CookieStorageUtilsCF.h"
#import "SandboxInitializationParameters.h"
#import "WebKitSystemInterface.h"
#import <WebCore/CFNetworkSPI.h>
@@ -180,7 +179,9 @@
void ChildProcess::setSharedHTTPCookieStorage(const Vector<uint8_t>& identifier)
{
- [NSHTTPCookieStorage _setSharedHTTPCookieStorage:adoptNS([[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:cookieStorageFromIdentifyingData(identifier).get()]).get()];
+ RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFDataCreate(kCFAllocatorDefault, identifier.data(), identifier.size()));
+ RetainPtr<CFHTTPCookieStorageRef> uiProcessCookieStorage = adoptCF(CFHTTPCookieStorageCreateFromIdentifyingData(kCFAllocatorDefault, cookieStorageData.get()));
+ [NSHTTPCookieStorage _setSharedHTTPCookieStorage:adoptNS([[NSHTTPCookieStorage alloc] _initWithCFHTTPCookieStorage:uiProcessCookieStorage.get()]).get()];
}
#if USE(APPKIT)
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (219528 => 219529)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2017-07-14 22:51:36 UTC (rev 219529)
@@ -26,7 +26,6 @@
#import "config.h"
#import "WebProcessPool.h"
-#import "CookieStorageUtilsCF.h"
#import "LegacyCustomProtocolManagerClient.h"
#import "NetworkProcessCreationParameters.h"
#import "NetworkProcessMessages.h"
@@ -238,8 +237,9 @@
parameters.networkATSContext = adoptCF(_CFNetworkCopyATSContext());
#if PLATFORM(MAC)
+ RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFHTTPCookieStorageCreateIdentifyingData(kCFAllocatorDefault, [[NSHTTPCookieStorage sharedHTTPCookieStorage] _cookieStorage]));
ASSERT(parameters.uiProcessCookieStorageIdentifier.isEmpty());
- parameters.uiProcessCookieStorageIdentifier = identifyingDataFromCookieStorage([[NSHTTPCookieStorage sharedHTTPCookieStorage] _cookieStorage]);
+ parameters.uiProcessCookieStorageIdentifier.append(CFDataGetBytePtr(cookieStorageData.get()), CFDataGetLength(cookieStorageData.get()));
#endif
#if ENABLE(MEDIA_STREAM)
// Allow microphone access if either preference is set because WebRTC requires microphone access.
@@ -293,8 +293,9 @@
parameters.loadThrottleLatency = Seconds { [defaults integerForKey:WebKitNetworkLoadThrottleLatencyMillisecondsDefaultsKey] / 1000. };
#if PLATFORM(MAC)
+ RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFHTTPCookieStorageCreateIdentifyingData(kCFAllocatorDefault, [[NSHTTPCookieStorage sharedHTTPCookieStorage] _cookieStorage]));
ASSERT(parameters.uiProcessCookieStorageIdentifier.isEmpty());
- parameters.uiProcessCookieStorageIdentifier = identifyingDataFromCookieStorage([[NSHTTPCookieStorage sharedHTTPCookieStorage] _cookieStorage]);
+ parameters.uiProcessCookieStorageIdentifier.append(CFDataGetBytePtr(cookieStorageData.get()), CFDataGetLength(cookieStorageData.get()));
#endif
parameters.cookieStoragePartitioningEnabled = cookieStoragePartitioningEnabled();
Modified: trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm (219528 => 219529)
--- trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/UIProcess/WebsiteData/Cocoa/WebsiteDataStoreCocoa.mm 2017-07-14 22:51:36 UTC (rev 219529)
@@ -26,7 +26,6 @@
#import "config.h"
#import "WebsiteDataStore.h"
-#import "CookieStorageUtilsCF.h"
#import "StorageManager.h"
#import "WebResourceLoadStatisticsStore.h"
#import "WebsiteDataStoreParameters.h"
@@ -64,7 +63,9 @@
auto utf8File = cookieFile.utf8();
auto url = "" (const UInt8 *)utf8File.data(), (CFIndex)utf8File.length(), true));
m_cfCookieStorage = adoptCF(CFHTTPCookieStorageCreateFromFile(kCFAllocatorDefault, url.get(), nullptr));
- m_uiProcessCookieStorageIdentifier = identifyingDataFromCookieStorage(m_cfCookieStorage.get());
+ auto cfData = adoptCF(CFHTTPCookieStorageCreateIdentifyingData(kCFAllocatorDefault, m_cfCookieStorage.get()));
+
+ m_uiProcessCookieStorageIdentifier.append(CFDataGetBytePtr(cfData.get()), CFDataGetLength(cfData.get()));
}
parameters.uiProcessCookieStorageIdentifier = m_uiProcessCookieStorageIdentifier;
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (219528 => 219529)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2017-07-14 22:51:36 UTC (rev 219529)
@@ -1036,7 +1036,6 @@
518E8EFB16B2091C00E91429 /* AuthenticationManager.mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 518E8EF716B2091C00E91429 /* AuthenticationManager.mac.mm */; };
51933DEF1965EB31008AC3EA /* MenuUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 51933DEB1965EB24008AC3EA /* MenuUtilities.h */; };
51933DF01965EB31008AC3EA /* MenuUtilities.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51933DEC1965EB24008AC3EA /* MenuUtilities.mm */; };
- 5194B3881F192FBD00FA4708 /* CookieStorageUtilsCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5194B3871F192FB900FA4708 /* CookieStorageUtilsCF.cpp */; };
51A4D5A916CAC4FF000E615E /* StatisticsRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A4D5A816CAC4FF000E615E /* StatisticsRequest.cpp */; };
51A555F5128C6C47009ABCEC /* WKContextMenuItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */; };
51A555F6128C6C47009ABCEC /* WKContextMenuItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -3285,8 +3284,6 @@
518E8EF716B2091C00E91429 /* AuthenticationManager.mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AuthenticationManager.mac.mm; sourceTree = "<group>"; };
51933DEB1965EB24008AC3EA /* MenuUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MenuUtilities.h; sourceTree = "<group>"; };
51933DEC1965EB24008AC3EA /* MenuUtilities.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MenuUtilities.mm; sourceTree = "<group>"; };
- 5194B3861F192FB900FA4708 /* CookieStorageUtilsCF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CookieStorageUtilsCF.h; sourceTree = "<group>"; };
- 5194B3871F192FB900FA4708 /* CookieStorageUtilsCF.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CookieStorageUtilsCF.cpp; sourceTree = "<group>"; };
51A4D5A816CAC4FF000E615E /* StatisticsRequest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StatisticsRequest.cpp; sourceTree = "<group>"; };
51A555F3128C6C47009ABCEC /* WKContextMenuItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKContextMenuItem.cpp; sourceTree = "<group>"; };
51A555F4128C6C47009ABCEC /* WKContextMenuItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKContextMenuItem.h; sourceTree = "<group>"; };
@@ -5120,8 +5117,6 @@
children = (
1AAF0C4912B16334008E49E2 /* ArgumentCodersCF.cpp */,
1AAF0C4812B16334008E49E2 /* ArgumentCodersCF.h */,
- 5194B3871F192FB900FA4708 /* CookieStorageUtilsCF.cpp */,
- 5194B3861F192FB900FA4708 /* CookieStorageUtilsCF.h */,
);
path = cf;
sourceTree = "<group>";
@@ -10403,7 +10398,6 @@
7C85FD7F19341665000177C4 /* WebPreferencesKeys.cpp in Sources */,
BC84EB1812A7100C0083F2DA /* WebPreferencesMac.mm in Sources */,
BCD598AD112B7FDF00EC8C23 /* WebPreferencesStore.cpp in Sources */,
- 5194B3881F192FBD00FA4708 /* CookieStorageUtilsCF.cpp in Sources */,
A1C512C8190656E500448914 /* WebPreviewLoaderClient.cpp in Sources */,
BC111AE4112F5C2600337BAB /* WebProcess.cpp in Sources */,
7C6E70FB18B2DC7A00F24E2E /* WebProcessCocoa.mm in Sources */,
Modified: trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm (219528 => 219529)
--- trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2017-07-14 22:27:52 UTC (rev 219528)
+++ trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm 2017-07-14 22:51:36 UTC (rev 219529)
@@ -26,7 +26,6 @@
#include "config.h"
#include "WebFrameNetworkingContext.h"
-#include "CookieStorageUtilsCF.h"
#include "NetworkSession.h"
#include "SessionTracker.h"
#include "WebCookieManager.h"
@@ -80,7 +79,8 @@
SandboxExtension::consumePermanently(parameters.cookieStoragePathExtensionHandle);
- RetainPtr<CFHTTPCookieStorageRef> uiProcessCookieStorage = cookieStorageFromIdentifyingData(parameters.uiProcessCookieStorageIdentifier);
+ RetainPtr<CFDataRef> cookieStorageData = adoptCF(CFDataCreate(kCFAllocatorDefault, parameters.uiProcessCookieStorageIdentifier.data(), parameters.uiProcessCookieStorageIdentifier.size()));
+ auto uiProcessCookieStorage = adoptCF(CFHTTPCookieStorageCreateFromIdentifyingData(kCFAllocatorDefault, cookieStorageData.get()));
NetworkStorageSession::ensureSession(parameters.sessionID, base + '.' + String::number(parameters.sessionID.sessionID()), WTFMove(uiProcessCookieStorage));