Remove unused mac/CookieStorageShimLibrary
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 May 2018 00:42:31 +0000 (00:42 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 May 2018 00:42:31 +0000 (00:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185146

Reviewed by Alex Christensen.

* Shared/mac/CookieStorageShimLibrary.cpp: Removed.
* Shared/mac/CookieStorageShimLibrary.h: Removed.
* WebKit.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231189 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Shared/mac/CookieStorageShimLibrary.cpp [deleted file]
Source/WebKit/Shared/mac/CookieStorageShimLibrary.h [deleted file]
Source/WebKit/WebKit.xcodeproj/project.pbxproj

index f523024..7486654 100644 (file)
@@ -1,3 +1,14 @@
+2018-04-30  Michael Saboff  <msaboff@apple.com>
+
+        Remove unused mac/CookieStorageShimLibrary
+        https://bugs.webkit.org/show_bug.cgi?id=185146
+
+        Reviewed by Alex Christensen.
+
+        * Shared/mac/CookieStorageShimLibrary.cpp: Removed.
+        * Shared/mac/CookieStorageShimLibrary.h: Removed.
+        * WebKit.xcodeproj/project.pbxproj:
+
 2018-04-30  Alex Christensen  <achristensen@webkit.org>
 
         Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync
diff --git a/Source/WebKit/Shared/mac/CookieStorageShimLibrary.cpp b/Source/WebKit/Shared/mac/CookieStorageShimLibrary.cpp
deleted file mode 100644 (file)
index 40bcf14..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Copyright (C) 2013 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 "CookieStorageShimLibrary.h"
-
-#if !PLATFORM(IOS)
-
-#include <WebCore/DynamicLinkerInterposing.h>
-#include <mutex>
-
-extern "C" CFDictionaryRef _CFHTTPCookieStorageCopyRequestHeaderFieldsForURL(CFAllocatorRef inAllocator, CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL);
-
-namespace WebKit {
-
-extern "C" void WebKitCookieStorageShimInitialize(const CookieStorageShimCallbacks&);
-
-static CookieStorageShimCallbacks cookieStorageShimCallbacks;
-
-class ShimProtector {
-public:
-    ShimProtector() { ++m_count; }
-    ~ShimProtector() { --m_count; }
-    static unsigned count() { return m_count; }
-private:
-    __thread static unsigned m_count;
-};
-
-__thread unsigned ShimProtector::m_count = 0;
-
-static CFDictionaryRef shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL(CFAllocatorRef inAllocator, CFHTTPCookieStorageRef inCookieStorage, CFURLRef inRequestURL)
-{
-    ShimProtector protector;
-
-    do {
-        // Protect against uninitialized callbacks:
-        if (!cookieStorageShimCallbacks.cookieStorageCopyRequestHeaderFieldsForURL)
-            break;
-
-        // Protect against accidental recursion:
-        if (ShimProtector::count() > 1)
-            break;
-
-        CFDictionaryRef results = cookieStorageShimCallbacks.cookieStorageCopyRequestHeaderFieldsForURL(inCookieStorage, inRequestURL);
-        if (!results)
-            break;
-
-        return results;
-    } while (0);
-
-    // If we've failed to retrieve the cookies manually, fall back to the original imposed function:
-    return _CFHTTPCookieStorageCopyRequestHeaderFieldsForURL(inAllocator, inCookieStorage, inRequestURL);
-}
-
-DYLD_INTERPOSE(shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL, _CFHTTPCookieStorageCopyRequestHeaderFieldsForURL);
-
-__attribute__((visibility("default")))
-void WebKitCookieStorageShimInitialize(const CookieStorageShimCallbacks& callbacks)
-{
-    // Because the value of cookieStorageShimCallbacks will be read from mulitple threads,
-    // only allow it to be initialized once.
-    static std::once_flag initializeCallbacksOnceFlag;
-    std::call_once(initializeCallbacksOnceFlag, [&callbacks] { cookieStorageShimCallbacks = callbacks; });
-}
-    
-}
-
-#endif // !PLATFORM(IOS)
diff --git a/Source/WebKit/Shared/mac/CookieStorageShimLibrary.h b/Source/WebKit/Shared/mac/CookieStorageShimLibrary.h
deleted file mode 100644 (file)
index 7747fc9..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2013 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.
- */
-
-#ifndef CookieStorageShimLibrary_h
-#define CookieStorageShimLibrary_h
-
-typedef struct OpaqueCFHTTPCookieStorage*  CFHTTPCookieStorageRef;
-
-namespace WebKit {
-
-struct CookieStorageShimCallbacks {
-    CFDictionaryRef (*cookieStorageCopyRequestHeaderFieldsForURL)(CFHTTPCookieStorageRef, CFURLRef);
-};
-
-typedef void (*CookieStorageShimInitializeFunc)(const CookieStorageShimCallbacks&);
-
-}
-
-#endif // CookieStorageShimLibrary_h
index 882bb8a..a3681d5 100644 (file)
                CDC2831D201BD79D00E6E745 /* WKFullscreenStackView.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC2831B201BD79D00E6E745 /* WKFullscreenStackView.h */; };
                CDC2831E201BD79D00E6E745 /* WKFullscreenStackView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC2831C201BD79D00E6E745 /* WKFullscreenStackView.mm */; };
                CDC382FE17211799008A2FC3 /* SecItemShimLibrary.mm in Sources */ = {isa = PBXBuildFile; fileRef = 511F8A78138B460900A95F44 /* SecItemShimLibrary.mm */; };
-               CDC38307172117DD008A2FC3 /* CookieStorageShimLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */; };
-               CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */; };
                CDCA85C8132ABA4E00E961DF /* WKFullScreenWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA85C6132ABA4E00E961DF /* WKFullScreenWindowController.mm */; };
                CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */; };
                CE11AD501CBC47F800681EE5 /* CodeSigning.mm in Sources */ = {isa = PBXBuildFile; fileRef = CE11AD4F1CBC47F800681EE5 /* CodeSigning.mm */; };
                CDC2831B201BD79D00E6E745 /* WKFullscreenStackView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFullscreenStackView.h; path = ios/fullscreen/WKFullscreenStackView.h; sourceTree = "<group>"; };
                CDC2831C201BD79D00E6E745 /* WKFullscreenStackView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFullscreenStackView.mm; path = ios/fullscreen/WKFullscreenStackView.mm; sourceTree = "<group>"; };
                CDC382F717211506008A2FC3 /* CFNetwork.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CFNetwork.framework; path = /System/Library/Frameworks/CFNetwork.framework; sourceTree = "<absolute>"; };
-               CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = CookieStorageShimLibrary.cpp; sourceTree = "<group>"; };
                CDC3830617211799008A2FC3 /* WebProcessShim.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebProcessShim.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
-               CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CookieStorageShimLibrary.h; sourceTree = "<group>"; };
                CDC8F4881725E67800166F6E /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
                CDCA85C6132ABA4E00E961DF /* WKFullScreenWindowController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKFullScreenWindowController.mm; sourceTree = "<group>"; };
                CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFullScreenWindowController.h; sourceTree = "<group>"; };
                                CE11AD4F1CBC47F800681EE5 /* CodeSigning.mm */,
                                1A2A4AFE158693920090C9E9 /* ColorSpaceData.h */,
                                1A2A4AFD158693920090C9E9 /* ColorSpaceData.mm */,
-                               CDC382F9172116D3008A2FC3 /* CookieStorageShimLibrary.cpp */,
-                               CDC3830B172121CE008A2FC3 /* CookieStorageShimLibrary.h */,
                                1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */,
                                2D50365D1BCC793F00E20BB3 /* NativeWebGestureEventMac.mm */,
                                C02BFF1D1251502E009CCBEA /* NativeWebKeyboardEventMac.mm */,
                                37C4E9F6131C6E7E0029BD5A /* config.h in Headers */,
                                BC032DAB10F437D10058C15A /* Connection.h in Headers */,
                                5106D7C418BDBE73000AB166 /* ContextMenuContextData.h in Headers */,
-                               CDC3830C17212282008A2FC3 /* CookieStorageShimLibrary.h in Headers */,
                                CE1A0BD31A48E6C60054EF74 /* CorePDFSPI.h in Headers */,
                                37C21CAE1E994C0C0029D5F9 /* CorePredictionSPI.h in Headers */,
                                B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */,
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
                        files = (
-                               CDC38307172117DD008A2FC3 /* CookieStorageShimLibrary.cpp in Sources */,
                                CDC382FE17211799008A2FC3 /* SecItemShimLibrary.mm in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;